ATMEL PLC Phy Sniffer Example.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | COUNT_MS_SWAP_LED 500 |
#define | ID_TC_1MS ID_TC3 |
#define | STRING_EOL "\r" |
#define | STRING_HEADER |
#define | TC_1MS TC1 |
#define | TC_1MS_CHN 0 |
#define | TC_1MS_Handler TC3_Handler |
#define | TC_1MS_IRQn TC3_IRQn |
Functions | |
static void | configure_dbg_console (void) |
Configure UART console. More... | |
void | initTimer1ms (void) |
Init Timer interrupt (1ms) More... | |
int | main (void) |
Main code entry point. More... | |
static void | prvSetupHardware (void) |
Configure the hardware. More... | |
void | TC_1MS_Handler (void) |
Interrupt handler for Timer 3. More... | |
Variables | |
static bool | b_led_swap = false |
static uint32_t | ul_count_ms = COUNT_MS_SWAP_LED |
#define COUNT_MS_SWAP_LED 500 |
Referenced by TC_1MS_Handler().
#define ID_TC_1MS ID_TC3 |
Referenced by initTimer1ms().
#define STRING_EOL "\r" |
#define STRING_HEADER |
Referenced by main().
#define TC_1MS TC1 |
Referenced by initTimer1ms(), and TC_1MS_Handler().
#define TC_1MS_CHN 0 |
Referenced by initTimer1ms(), and TC_1MS_Handler().
#define TC_1MS_Handler TC3_Handler |
#define TC_1MS_IRQn TC3_IRQn |
|
static |
Configure UART console.
References uart_rs232_options::baudrate, CONF_UART, CONF_UART_BAUDRATE, CONF_UART_ID, CONF_UART_PARITY, stdio_serial_init(), and sysclk_enable_peripheral_clock().
Referenced by main().
void initTimer1ms | ( | void | ) |
Init Timer interrupt (1ms)
Initialize 1mSec timer 3 interrupt
Start the timer. TC1, chanel 0 = TC3
References ID_TC_1MS, pmc_enable_periph_clk(), TC_1MS, TC_1MS_CHN, tc_enable_interrupt(), tc_init(), tc_start(), and tc_write_rc().
Referenced by main().
int main | ( | void | ) |
Main code entry point.
References b_led_swap, configure_dbg_console(), initTimer1ms(), LED_Toggle, phy_init(), prvSetupHardware(), SNIFFER_IF_ENABLE, sniffer_if_process(), STATUS_OK, STRING_HEADER, ul_count_ms, usi_init(), and usi_process().
|
static |
void TC_1MS_Handler | ( | void | ) |
Interrupt handler for Timer 3.
Handler for Timer 3
References b_led_swap, COUNT_MS_SWAP_LED, TC_1MS, TC_1MS_CHN, tc_get_status(), ul_count_ms, and UNUSED.
Referenced by main(), and TC_1MS_Handler().
|
static |
Referenced by main(), and TC_1MS_Handler().