Microchip® Advanced Software Framework

phy_tester_tool.c File Reference

ATMEL PLC Phy Tester Example.

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

#include "board.h"
#include "asf.h"

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
Value:
"-- ATMEL PLC Phy Tester Tool Application --\r\n" \
"-- "BOARD_NAME " --\r\n" \
"-- Compiled: "__DATE__ " "__TIME__ " --"STRING_EOL
#define BOARD_NAME
Definition: inc/app_init.h:140
#define STRING_EOL
Definition: phy_tester_tool.c:81

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 void configure_dbg_console ( void  )
static
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().

static void prvSetupHardware ( void  )
static

Configure the hardware.

References board_init(), and sysclk_init().

Referenced by main().

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.

bool b_led_swap = false
static

Referenced by main(), and TC_1MS_Handler().

uint32_t ul_count_ms = COUNT_MS_SWAP_LED
static

Referenced by main(), and TC_1MS_Handler().