spiisolator 2.0.0.0
main.c File Reference

Spiisolator Click example. More...

#include "board.h"
#include "log.h"
#include "spiisolator.h"

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'
 

Detailed Description

Spiisolator Click example.

Description

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 :

Application Init

Initialization driver enables - SPI, set default configuration, also write log.

Application Task

Controls an 8x8 click board and displays the steps on UART Terminal.

Author
MikroE Team

Function Documentation

◆ application_init()

void application_init ( void )

Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG

Note
If USB_UART_RX and USB_UART_TX are defined as HAL_PIN_NC, you will need to define them manually for log to work. See LOG_MAP_USB_UART macro definition for detailed explanation.

◆ application_task()

void application_task ( void )

◆ c8x8_default_cfg()

void c8x8_default_cfg ( spiisolator_t * ctx)

◆ c8x8_display_byte()

void c8x8_display_byte ( spiisolator_t * ctx,
char tx_byte )

◆ c8x8_display_image()

void c8x8_display_image ( spiisolator_t * ctx,
uint8_t * p_image )

◆ c8x8_display_refresh()

void c8x8_display_refresh ( spiisolator_t * ctx)

◆ c8x8_display_string()

void c8x8_display_string ( spiisolator_t * ctx,
char * p_array )

◆ main()

int main ( void )

Variable Documentation

◆ demo_char

char demo_char = 'A'

◆ demo_img_off

uint8_t demo_img_off[8] = { 0xf7, 0xe3, 0xc9, 0xdd, 0xf7, 0xe3, 0xc9, 0xdd }

◆ demo_img_on

uint8_t demo_img_on[8] = { 0x08, 0x1c, 0x36, 0x22, 0x08, 0x1c, 0x36, 0x22 }

◆ demo_string

uint8_t demo_string[11] = { ' ', '-', 'M', 'i', 'k', 'r', 'o', 'E', '-', ' ', 0 }