Tester application.
Copyright (c) 2012-2018 Microchip Technology Inc. and its subsidiaries.
#include "config.h"
#include "phy.h"
#include "sys.h"
#include "nwk.h"
#include "led.h"
#include "sysclk.h"
#include "tester.h"
#include "commands.h"
#include "filter.h"
#include "events.h"
#include "time.h"
#include "sio2host.h"
#include "asf.h"
Typedefs | |
typedef enum AppState_t | AppState_t |
typedef enum AppUartState_t | AppUartState_t |
Functions | |
static void | APP_TaskHandler (void) |
static uint16_t | appCrcCcittUpdate (uint16_t crc, uint8_t byte) |
static void | appUartSendAck (AppStatus_t status) |
void | appUartSendCommand (uint8_t *buf, uint16_t size) |
static void | appUartStateMachine (uint8_t byte) |
int | main (void) |
static void | Serial_Handler (void) |
Variables | |
static AppState_t | appState = APP_STATE_INITIAL |
static uint8_t | appUartBuffer [APP_UART_BUFFER_SIZE] |
static uint16_t | appUartBufferCrc |
static uint16_t | appUartBufferPtr |
static uint16_t | appUartCrc |
static uint16_t | appUartSize |
static AppUartState_t | appUartState = APP_UART_STATE_IDLE |
static uint8_t | rx_data [APP_RX_BUF_SIZE] |
static uint8_t | sio_rx_length |
typedef enum AppState_t AppState_t |
typedef enum AppUartState_t AppUartState_t |
enum AppState_t |
enum AppUartState_t |
|
static |
References APP_STATE_IDLE, APP_STATE_INITIAL, appCommandsInit(), appFilterInit(), and appState.
Referenced by main().
|
static |
Referenced by appUartSendCommand(), and appUartStateMachine().
|
static |
References APP_COMMAND_ACK, appTimeGet(), appUartSendCommand(), AppCommandAck_t::id, status, AppCommandAck_t::status, and AppCommandAck_t::time.
Referenced by appUartStateMachine().
void appUartSendCommand | ( | uint8_t * | buf, |
uint16_t | size | ||
) |
References APP_UART_START_SYMBOL, appCrcCcittUpdate(), and sio2host_putchar().
Referenced by appCommandsSendDataConf(), appCommandsSendDataInd(), appCommandsSendRouteEntry(), and appUartSendAck().
|
static |
References APP_STATUS_INVALID_CRC, APP_UART_START_SYMBOL, APP_UART_STATE_IDLE, APP_UART_STATE_READ_CRC_1, APP_UART_STATE_READ_CRC_2, APP_UART_STATE_READ_DATA, APP_UART_STATE_READ_SIZE_1, APP_UART_STATE_READ_SIZE_2, appCommandReceived(), appCrcCcittUpdate(), appUartBuffer, appUartBufferCrc, appUartBufferPtr, appUartCrc, appUartSendAck(), appUartSize, and appUartState.
Referenced by Serial_Handler().
int main | ( | void | ) |
References APP_TaskHandler(), appTimeInit(), board_init(), cpu_irq_enable, delay_init, Serial_Handler(), sio2host_init(), SYS_Init(), SYS_TaskHandler(), and sysclk_init.
|
static |
References APP_RX_BUF_SIZE, appUartStateMachine(), rx_data, sio2host_rx(), and sio_rx_length.
Referenced by main().
|
static |
Referenced by APP_TaskHandler().
|
static |
Referenced by appUartStateMachine().
|
static |
Referenced by appUartStateMachine().
|
static |
Referenced by appUartStateMachine().
|
static |
Referenced by appUartStateMachine().
|
static |
Referenced by appUartStateMachine().
|
static |
Referenced by appUartStateMachine().
|
static |
Referenced by Serial_Handler(), and udi_cdc_multi_getc().
|
static |
Referenced by Serial_Handler().