Microchip® Advanced Software Framework

twi_slave_example.c File Reference

TWI SLAVE Example for SAM.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

#include "asf.h"
#include "conf_twi_slave_example.h"

Data Structures

struct  _slave_device_t
 The slave device instance. More...
 

Macros

#define MEMORY_SIZE   512
 Memory size in bytes. More...
 
#define SLAVE_ADDRESS   0x40
 Device address of slave. More...
 
#define STRING_EOL   "\r"
 
#define STRING_HEADER
 

Typedefs

typedef struct _slave_device_t slave_device_t
 The slave device instance. More...
 

Functions

void BOARD_TWI_Handler (void)
 
static void configure_console (void)
 Configure the Console UART. More...
 
int main (void)
 Application entry point for TWI Slave example. More...
 

Variables

slave_device_t emulate_driver
 

#define MEMORY_SIZE   512

Memory size in bytes.

Referenced by main().

#define SLAVE_ADDRESS   0x40

Device address of slave.

Referenced by main().

#define STRING_EOL   "\r"
#define STRING_HEADER
Value:
"--TWI SLAVE Example --\r\n" \
"-- "BOARD_NAME" --\r\n" \
"-- Compiled: "__DATE__" "__TIME__" --"STRING_EOL
#define BOARD_NAME
Definition: inc/app_init.h:140
#define STRING_EOL
Definition: twi_slave_example.c:105

Referenced by main().

The slave device instance.

static void configure_console ( void  )
static

slave_device_t emulate_driver