![]() |
Linduino
1.3.0
Linear Technology Arduino-Compatible Demonstration Board
|
Go to the source code of this file.
Functions | |
int32_t | i2c_init (i2c_desc **desc, const struct i2c_init_param *param) |
Initialize the I2C communication peripheral. More... | |
int32_t | i2c_remove (i2c_desc *desc) |
Free the resources allocated by i2c_init(). More... | |
int32_t | i2c_write (i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit) |
Write data to a slave device. More... | |
int32_t | i2c_read (i2c_desc *desc, uint8_t *data, uint8_t bytes_number, uint8_t stop_bit) |
Read data from a slave device. More... | |
int32_t | spi_init (spi_desc **desc, const struct spi_init_param *param) |
Initialize the SPI communication peripheral. More... | |
int32_t | spi_remove (spi_desc *desc) |
Free the resources allocated by spi_init(). More... | |
int32_t | spi_write_and_read (spi_desc *desc, uint8_t *data, uint8_t bytes_number) |
Write and read data to/from SPI. More... | |
int32_t | gpio_get (gpio_desc **desc, uint8_t gpio_number) |
Obtain the GPIO decriptor. More... | |
int32_t | gpio_remove (gpio_desc *desc) |
Free the resources allocated by gpio_get(). More... | |
int32_t | gpio_direction_input (gpio_desc *desc) |
Enable the input direction of the specified GPIO. More... | |
int32_t | gpio_direction_output (gpio_desc *desc, uint8_t value) |
Enable the output direction of the specified GPIO. More... | |
int32_t | gpio_get_direction (gpio_desc *desc, uint8_t *direction) |
Get the direction of the specified GPIO. More... | |
int32_t | gpio_set_value (gpio_desc *desc, uint8_t value) |
Set the value of the specified GPIO. More... | |
int32_t | gpio_get_value (gpio_desc *desc, uint8_t *value) |
Get the value of the specified GPIO. More... | |
void | mdelay (uint32_t msecs) |
Generate miliseconds delay. More... | |
void | Wire_Connect () |
Connects to I2C device. More... | |
uint8_t | Wire_Write (unsigned char address, unsigned char *data, unsigned char length, unsigned char stop) |
Write to I2C device. More... | |
uint8_t | Wire_Read (unsigned char address, unsigned char *data, unsigned char length, unsigned char stop) |
Read from I2C device. More... | |
void | quikeval_set_mux (uint8_t mux) |
Sets the Linduino MUX that selects SPI or I2C for the quikeval port. More... | |
void | uartTX (char *buf) |
Enable SPI, matches spi_enable. More... | |
Variables | |
const uint8_t | arduino_spi_modes [4] |
int32_t gpio_direction_input | ( | gpio_desc * | desc | ) |
Enable the input direction of the specified GPIO.
desc | - The GPIO descriptor. |
Definition at line 290 of file platform_drivers.cpp.
int32_t gpio_direction_output | ( | gpio_desc * | desc, |
uint8_t | value | ||
) |
Enable the output direction of the specified GPIO.
desc | - The GPIO descriptor. |
value | - The value. Example: GPIO_HIGH GPIO_LOW |
Definition at line 305 of file platform_drivers.cpp.
int32_t gpio_get | ( | gpio_desc ** | desc, |
uint8_t | gpio_number | ||
) |
Obtain the GPIO decriptor.
desc | - The GPIO descriptor. |
gpio_number | - The number of the GPIO. |
Definition at line 258 of file platform_drivers.cpp.
int32_t gpio_get_direction | ( | gpio_desc * | desc, |
uint8_t * | direction | ||
) |
Get the direction of the specified GPIO.
desc | - The GPIO descriptor. |
direction | - The direction. Example: GPIO_OUT GPIO_IN |
Definition at line 322 of file platform_drivers.cpp.
int32_t gpio_get_value | ( | gpio_desc * | desc, |
uint8_t * | value | ||
) |
Get the value of the specified GPIO.
desc | - The GPIO descriptor. |
value | - The value. Example: GPIO_HIGH GPIO_LOW |
Definition at line 360 of file platform_drivers.cpp.
int32_t gpio_remove | ( | gpio_desc * | desc | ) |
Free the resources allocated by gpio_get().
desc | - The SPI descriptor. |
Definition at line 276 of file platform_drivers.cpp.
int32_t gpio_set_value | ( | gpio_desc * | desc, |
uint8_t | value | ||
) |
Set the value of the specified GPIO.
desc | - The GPIO descriptor. |
value | - The value. Example: GPIO_HIGH GPIO_LOW |
Definition at line 344 of file platform_drivers.cpp.
int32_t i2c_init | ( | i2c_desc ** | desc, |
const struct i2c_init_param * | param | ||
) |
Initialize the I2C communication peripheral.
desc | - The I2C descriptor. |
init_param | - The structure that contains the I2C parameters. |
Definition at line 60 of file platform_drivers.cpp.
int32_t i2c_read | ( | i2c_desc * | desc, |
uint8_t * | data, | ||
uint8_t | bytes_number, | ||
uint8_t | stop_bit | ||
) |
Read data from a slave device.
desc | - The I2C descriptor. |
data | - Buffer that will store the received data. |
bytes_number | - Number of bytes to read. |
stop_bit | - Stop condition control. Example: 0 - A stop condition will not be generated; 1 - A stop condition will be generated. |
Definition at line 122 of file platform_drivers.cpp.
int32_t i2c_remove | ( | i2c_desc * | desc | ) |
Free the resources allocated by i2c_init().
desc | - The I2C descriptor. |
Definition at line 89 of file platform_drivers.cpp.
int32_t i2c_write | ( | i2c_desc * | desc, |
uint8_t * | data, | ||
uint8_t | bytes_number, | ||
uint8_t | stop_bit | ||
) |
Write data to a slave device.
desc | - The I2C descriptor. |
data | - Buffer that stores the transmission data. |
bytes_number | - Number of bytes to write. |
stop_bit | - Stop condition control. Example: 0 - A stop condition will not be generated; 1 - A stop condition will be generated. |
Definition at line 104 of file platform_drivers.cpp.
void mdelay | ( | uint32_t | msecs | ) |
Generate miliseconds delay.
msecs | - Delay in miliseconds. |
Definition at line 374 of file platform_drivers.cpp.
void quikeval_set_mux | ( | uint8_t | mux | ) |
Sets the Linduino MUX that selects SPI or I2C for the quikeval port.
mux | - New mux selection Example: MUX_I2C - Enable I2C MUX_SPI - Enable SPI |
Definition at line 465 of file platform_drivers.cpp.
int32_t spi_init | ( | spi_desc ** | desc, |
const struct spi_init_param * | param | ||
) |
Initialize the SPI communication peripheral.
desc | - The SPI descriptor. |
init_param | - The structure that contains the SPI parameters. |
Definition at line 147 of file platform_drivers.cpp.
int32_t spi_remove | ( | spi_desc * | desc | ) |
Free the resources allocated by spi_init().
desc | - The SPI descriptor. |
Definition at line 186 of file platform_drivers.cpp.
int32_t spi_write_and_read | ( | spi_desc * | desc, |
uint8_t * | data, | ||
uint8_t | bytes_number | ||
) |
Write and read data to/from SPI.
desc | - The SPI descriptor. |
data | - The buffer with the transmitted/received data. |
bytes_number | - Number of bytes to write/read. |
Definition at line 200 of file platform_drivers.cpp.
void uartTX | ( | char * | buf | ) |
Enable SPI, matches spi_enable.
Initialize SPI, matches spi_init
Connect to SPI, matches quikeval_spi_connect
Definition at line 483 of file platform_drivers.cpp.
void Wire_Connect | ( | ) |
Connects to I2C device.
Connects and initializes I2C.
Definition at line 390 of file platform_drivers.cpp.
uint8_t Wire_Read | ( | unsigned char | address, |
unsigned char * | data, | ||
unsigned char | length, | ||
unsigned char | stop | ||
) |
Read from I2C device.
Read I2C.
address | - Address of device |
data | - Data read back |
length | - Length of data byte array to read |
stop | - Stop bit |
Definition at line 436 of file platform_drivers.cpp.
uint8_t Wire_Write | ( | unsigned char | address, |
unsigned char * | data, | ||
unsigned char | length, | ||
unsigned char | stop | ||
) |
Write to I2C device.
Write I2C.
address | - Address of device |
data | - Data to write, includes command |
length | - Length of data byte array |
stop | - Stop bit |
Definition at line 406 of file platform_drivers.cpp.
const uint8_t arduino_spi_modes[4] |
Definition at line 132 of file platform_drivers.cpp.