i2cisolator2 2.0.0.0
|
I2C Isolator 2 Click example. More...
Macros | |
#define | EEPROM3_MEMORY_ADDRESS 0x10000ul |
#define | EEPROM3_SLAVE_ADDRESS 0x54 |
#define | EEPROM3_DEMO_TEXT "MikroE - I2C Isolator 2 with EEPROM 3 click!" |
Functions | |
err_t | eeprom3_write_page (uint32_t address, uint8_t *data_in, uint8_t len) |
err_t | eeprom3_read_page (uint32_t address, uint8_t *data_out, uint8_t len) |
void | application_init () |
void | application_task () |
int | main (void) |
I2C Isolator 2 Click example.
This example showcases how to initialize, configure and use the I2C Isolator 2 click module. The click provides I2C lines and power isolation for slave devices. In order for this example to work, you need the EEPROM 3 click.
The demo application is composed of two sections :
Initializes the driver and enables the power output.
Writes the desired message to EEPROM 3 click board and reads it back every 2 seconds. All data is being displayed on the USB UART where you can track the program flow.
#define EEPROM3_DEMO_TEXT "MikroE - I2C Isolator 2 with EEPROM 3 click!" |
#define EEPROM3_MEMORY_ADDRESS 0x10000ul |
#define EEPROM3_SLAVE_ADDRESS 0x54 |
void application_init | ( | ) |
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | ) |
err_t eeprom3_read_page | ( | uint32_t | address, |
uint8_t * | data_out, | ||
uint8_t | len ) |
err_t eeprom3_write_page | ( | uint32_t | address, |
uint8_t * | data_in, | ||
uint8_t | len ) |
int main | ( | void | ) |