spiisolator 2.0.0.0
|
Spiisolator Click example. More...
Functions | |
void | c8x8_display_string (spiisolator_t *ctx, char *p_array) |
void | c8x8_display_byte (spiisolator_t *ctx, char tx_byte) |
void | c8x8_display_image (spiisolator_t *ctx, uint8_t *p_image) |
void | c8x8_display_refresh (spiisolator_t *ctx) |
void | c8x8_default_cfg (spiisolator_t *ctx) |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
Variables | |
uint8_t | demo_string [11] = { ' ', '-', 'M', 'i', 'k', 'r', 'o', 'E', '-', ' ', 0 } |
uint8_t | demo_img_on [8] = { 0x08, 0x1c, 0x36, 0x22, 0x08, 0x1c, 0x36, 0x22 } |
uint8_t | demo_img_off [8] = { 0xf7, 0xe3, 0xc9, 0xdd, 0xf7, 0xe3, 0xc9, 0xdd } |
char | demo_char = 'A' |
Spiisolator Click example.
The click is designed to run on either 3.3V or 5V power supply. It communicates with the target microcontroller over SPI interface. In this example we have used an 8x8 click board connected to a SPI Isolator click board.
The demo application is composed of two sections :
Initialization driver enables - SPI, set default configuration, also write log.
Controls an 8x8 click board and displays the steps on UART Terminal.
void application_init | ( | void | ) |
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
void c8x8_default_cfg | ( | spiisolator_t * | ctx | ) |
void c8x8_display_byte | ( | spiisolator_t * | ctx, |
char | tx_byte ) |
void c8x8_display_image | ( | spiisolator_t * | ctx, |
uint8_t * | p_image ) |
void c8x8_display_refresh | ( | spiisolator_t * | ctx | ) |
void c8x8_display_string | ( | spiisolator_t * | ctx, |
char * | p_array ) |
int main | ( | void | ) |
char demo_char = 'A' |
uint8_t demo_img_off[8] = { 0xf7, 0xe3, 0xc9, 0xdd, 0xf7, 0xe3, 0xc9, 0xdd } |
uint8_t demo_img_on[8] = { 0x08, 0x1c, 0x36, 0x22, 0x08, 0x1c, 0x36, 0x22 } |
uint8_t demo_string[11] = { ' ', '-', 'M', 'i', 'k', 'r', 'o', 'E', '-', ' ', 0 } |