Microchip® Advanced Software Framework

twihs_slave_example.c File Reference

TWIHS Slave Example for SAM.

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

#include "asf.h"
#include "conf_twihs_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_TWIHS_Handler (void)
 
static void configure_console (void)
 Configure the Console UART. More...
 
int main (void)
 Application entry point for TWIHS 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:
"--TWIHS SLAVE Example --\r\n" \
"-- "BOARD_NAME" --\r\n" \
"-- Compiled: "__DATE__" "__TIME__" --"STRING_EOL
#define BOARD_NAME
Definition: fatfs_access_example.c:112
#define STRING_EOL
Definition: twihs_slave_example.c:108

Referenced by main().

The slave device instance.

static void configure_console ( void  )
static

Configure the Console UART.

References uart_rs232_options::baudrate, stdio_serial_init(), and sysclk_enable_peripheral_clock().

Referenced by main().

slave_device_t emulate_driver