uarttoi2c 2.1.0.0
|
UART to I2C Click Example. More...
Macros | |
#define | DEVICE_NAME "3D Hall 11 click" |
#define | DEVICE_SLAVE_ADDRESS 0x35 |
#define | DEVICE_REG_ID 0x0D |
#define | DEVICE_ID 0x01 |
Functions | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
UART to I2C Click Example.
This example demonstrates the use of USB to I2C click board by reading the device ID of a 3D Hall 11 click board connected to the I2C port and controlling the GPIO pins.
The demo application is composed of two sections :
Initializes the driver and performs the click default config which resets the device and sets the GPIO pins 0-3 as push-pull output and others as input. After that, reads and displays the chip firmware version.
Reads the device ID of a 3D Hall 11 click board connected to the I2C port, toggles the output pins and displays the GPIO port state. The results will be displayed on the USB UART approximately once per second.
#define DEVICE_ID 0x01 |
#define DEVICE_NAME "3D Hall 11 click" |
#define DEVICE_REG_ID 0x0D |
#define DEVICE_SLAVE_ADDRESS 0x35 |
void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
int main | ( | void | ) |