Microchip® Advanced Software Framework

tester.c File Reference

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 "system.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
 

Enumerations

enum  AppState_t {
  APP_STATE_INITIAL,
  APP_STATE_IDLE
}
 
enum  AppUartState_t {
  APP_UART_STATE_IDLE,
  APP_UART_STATE_READ_SIZE_1,
  APP_UART_STATE_READ_SIZE_2,
  APP_UART_STATE_READ_DATA,
  APP_UART_STATE_READ_CRC_1,
  APP_UART_STATE_READ_CRC_2
}
 

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

enum AppState_t
Enumerator
APP_STATE_INITIAL 
APP_STATE_IDLE 
Enumerator
APP_UART_STATE_IDLE 
APP_UART_STATE_READ_SIZE_1 
APP_UART_STATE_READ_SIZE_2 
APP_UART_STATE_READ_DATA 
APP_UART_STATE_READ_CRC_1 
APP_UART_STATE_READ_CRC_2 

static void APP_TaskHandler ( void  )
static
static uint16_t appCrcCcittUpdate ( uint16_t  crc,
uint8_t  byte 
)
static
void appUartSendCommand ( uint8_t *  buf,
uint16_t  size 
)
void Serial_Handler ( void  )
static

AppState_t appState = APP_STATE_INITIAL
static

Referenced by APP_TaskHandler().

uint8_t appUartBuffer[APP_UART_BUFFER_SIZE]
static

Referenced by appUartStateMachine().

uint16_t appUartBufferCrc
static

Referenced by appUartStateMachine().

uint16_t appUartBufferPtr
static

Referenced by appUartStateMachine().

uint16_t appUartCrc
static

Referenced by appUartStateMachine().

uint16_t appUartSize
static

Referenced by appUartStateMachine().

AppUartState_t appUartState = APP_UART_STATE_IDLE
static

Referenced by appUartStateMachine().

uint8_t rx_data[APP_RX_BUF_SIZE]
static
uint8_t sio_rx_length
static

Referenced by Serial_Handler().