SAMV71 Xplained Ultra Software Package 1.5

main.c File Reference

#include "board.h"
#include <stdint.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <assert.h>

Go to the source code of this file.

Defines

#define TWCK   400000
#define AT24MAC_ADDRESS   0x57
#define AT24MAC_SERIAL_NUM_ADD   0x5F
#define PAGE_SIZE   16
#define EEPROM_PAGES   16
#define BOARD_PINS_TWI_EEPROM   PINS_TWI0
#define BOARD_ID_TWI_EEPROM   ID_TWIHS0
#define BOARD_BASE_TWI_EEPROM   TWIHS0

Functions

 COMPILER_ALIGNED (32)
 TWI interrupt handler. Forwards the interrupt to the TWI driver handler.
void XDMAC_Handler (void)
 xDMA interrupt handler.
int main (void)
 Application entry point for TWI EEPROM example.

Detailed Description

This file contains all the specific code for the twi eeprom example.

Definition in file main.c.


Define Documentation

#define AT24MAC_ADDRESS   0x57

Slave address of twi_eeprom example.

Definition at line 114 of file main.c.

#define BOARD_BASE_TWI_EEPROM   TWIHS0

TWI0 base address for EEPROM device

Definition at line 130 of file main.c.

#define BOARD_ID_TWI_EEPROM   ID_TWIHS0

TWI0 peripheral ID for EEPROM device

Definition at line 127 of file main.c.

#define BOARD_PINS_TWI_EEPROM   PINS_TWI0

EEPROM Pins definition

Definition at line 124 of file main.c.

#define EEPROM_PAGES   16

Page numbers of an AT24MAC402 chip

Definition at line 121 of file main.c.

#define PAGE_SIZE   16

Page size of an AT24MAC402 chip (in bytes)

Definition at line 118 of file main.c.

#define TWCK   400000

TWI clock frequency in Hz.

Definition at line 111 of file main.c.


Function Documentation

COMPILER_ALIGNED ( 32   ) 

TWI interrupt handler. Forwards the interrupt to the TWI driver handler.

Page buffer.

Definition at line 143 of file main.c.

int main ( void   ) 

Application entry point for TWI EEPROM example.

Returns:
Unused (ANSI-C compatibility).

Definition at line 223 of file main.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines