Peer2Peer application implementation.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "config.h"
#include "sys.h"
#include "system.h"
#include "phy.h"
#include "nwk.h"
#include "sysTimer.h"
#include "sio2host.h"
#include "asf.h"
Macros | |
#define | APP_BUFFER_SIZE (NWK_MAX_PAYLOAD_SIZE - NWK_SECURITY_MIC_SIZE) |
Typedefs | |
typedef enum AppState_t | AppState_t |
Enumerations | |
enum | AppState_t { APP_STATE_INITIAL, APP_STATE_IDLE } |
Functions | |
static void | APP_TaskHandler (void) |
static void | appDataConf (NWK_DataReq_t *req) |
static bool | appDataInd (NWK_DataInd_t *ind) |
static void | appInit (void) |
static void | appSendData (void) |
static void | appTimerHandler (SYS_Timer_t *timer) |
int | main (void) |
Variables | |
static NWK_DataReq_t | appDataReq |
static uint8_t | appDataReqBuffer [APP_BUFFER_SIZE] |
static bool | appDataReqBusy = false |
static AppState_t | appState = APP_STATE_INITIAL |
static SYS_Timer_t | appTimer |
static uint8_t | appUartBuffer [APP_BUFFER_SIZE] |
static uint8_t | appUartBufferPtr = 0 |
static uint8_t | rx_data [APP_RX_BUF_SIZE] |
static uint8_t | sio_rx_length |
#define APP_BUFFER_SIZE (NWK_MAX_PAYLOAD_SIZE - NWK_SECURITY_MIC_SIZE) |
typedef enum AppState_t AppState_t |
enum AppState_t |
|
static |
References APP_RX_BUF_SIZE, APP_STATE_IDLE, APP_STATE_INITIAL, appInit(), appSendData(), appState, appUartBuffer, appUartBufferPtr, rx_data, sio2host_putchar(), sio2host_rx(), sio_rx_length, SYS_TimerStart(), and SYS_TimerStop().
Referenced by main().
|
static |
References appDataReqBusy.
Referenced by appSendData().
|
static |
References NWK_DataInd_t::data, LED0, LED_Toggle, sio2host_putchar(), and NWK_DataInd_t::size.
Referenced by appInit().
|
static |
References APP_ADDR, APP_CHANNEL, APP_ENDPOINT, APP_FLUSH_TIMER_INTERVAL, APP_PANID, appDataInd(), appTimerHandler(), SYS_Timer_t::handler, SYS_Timer_t::interval, SYS_Timer_t::mode, NWK_OpenEndpoint(), NWK_SetAddr(), NWK_SetPanId(), PHY_SetBand(), PHY_SetChannel(), PHY_SetModulation(), PHY_SetRxState(), and SYS_TIMER_INTERVAL_MODE.
Referenced by APP_TaskHandler().
|
static |
References APP_ADDR, APP_ENDPOINT, appDataConf(), appDataReqBuffer, appDataReqBusy, appUartBuffer, appUartBufferPtr, NWK_DataReq_t::confirm, NWK_DataReq_t::data, NWK_DataReq_t::dstAddr, NWK_DataReq_t::dstEndpoint, LED0, LED_Toggle, NWK_DataReq(), NWK_OPT_ENABLE_SECURITY, NWK_DataReq_t::options, NWK_DataReq_t::size, and NWK_DataReq_t::srcEndpoint.
Referenced by APP_TaskHandler(), and appTimerHandler().
|
static |
References appSendData().
Referenced by appInit().
int main | ( | void | ) |
References APP_TaskHandler(), board_init(), cpu_irq_enable, delay_init, irq_initialize_vectors, LED0, LED_On, sio2host_init(), SYS_Init(), SYS_TaskHandler(), and sysclk_init().
|
static |
|
static |
Referenced by appSendData().
Referenced by appDataConf(), and appSendData().
|
static |
Referenced by APP_TaskHandler().
|
static |
|
static |
Referenced by APP_TaskHandler(), and appSendData().
|
static |
Referenced by APP_TaskHandler(), and appSendData().
|
static |
Referenced by APP_TaskHandler().
|
static |
Referenced by APP_TaskHandler().