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) |
Main function. More... | |
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 | ) |
Main function.
Main function.
This function initializes the MAC, initiates a MLME reset request (wpan_mlme_reset_req()), and implements a the main loop.
Main function.
The master example begins by initializing required board resources. The system clock, basic GPIO pin mapping, and interrupt vectors are established.
A memory location on a TWI slave is written with a fixed test pattern which is then read back into a separate buffer. As a basic sanity check, the original write-buffer values are compared with values read from the slave to a separate buffer. An LED on the development board is illuminated when there is a match between the written and read data.
Main function.
Main function.
Initializes the clock system, board and serial output, then sets up the Sleep Manager unit test suite and runs it.
Main function.
Initializes the clock system, board and serial output, then sets up the IOPORT Service unit test suite and runs it.
Main function.
Initializes the clock system, board and serial output, then sets up the USART unit test suite and runs it.
Main function.
Initializes the clock system, board and serial output, then sets up the TWI unit test suite and runs it.
Main function.
The SAM3X_EK, SAM3X Arduino board and SAM4C_EK use two bytes length internal address EEPROM.
References APP_TaskHandler(), appTimeInit(), board_init(), cpu_irq_enable, delay_init, LED0, LED_On, 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().
|
static |
Referenced by Serial_Handler().