swieeprom 2.1.0.0
main.c File Reference

SWI EEPROM Click Example. More...

#include "board.h"
#include "log.h"
#include "swieeprom.h"

Macros

#define DEMO_TEXT_MESSAGE   "MIKROE"
 
#define STARTING_ADDRESS   0x00
 

Functions

void application_init (void)
 
void application_task (void)
 
int main (void)
 

Detailed Description

SWI EEPROM Click Example.

Description

This example demonstrates the use of SWI EEPROM click board by writing specified data to the memory and reading it back.

The demo application is composed of two sections :

Application Init

Initializes the driver and logger and checks the communication.

Application Task

Writes the specified text message to the memory and reads it back. After that, erases the whole memory and tries to read the same message verifying that the memory is erased. All data is being displayed on the USB UART where you can track the program flow.

Note
This application is written for the following MCUs and specifically for MIKROBUS 1: STM32F407ZG, MK64FN1M0VDC12, TM4C129XNCZAD, GD32VF103VBT6, PIC32MX795F512L In order to use it on another MCUs the pin_x functions must be defined in a way it matches the required timing specifications for the Single Wire interface.
Author
Stefan Filipovic

Macro Definition Documentation

◆ DEMO_TEXT_MESSAGE

#define DEMO_TEXT_MESSAGE   "MIKROE"

◆ STARTING_ADDRESS

#define STARTING_ADDRESS   0x00

Function Documentation

◆ application_init()

void application_init ( void )

< Logger config object.

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 )

◆ main()

int main ( void )