Microchip® Advanced Software Framework

app_init.h File Reference

Initialization prototypes and enumerations - Performance Analyzer application.

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

#include "tal.h"
#include "string.h"
#include "app_config.h"
#include "user_interface.h"
#include "conf_perf_analyzer.h"

Data Structures

struct  node_ib_t
 Structure to holds the information base for the node. More...
 

Macros

#define CRC_SETTING_ON_REMOTE_NODE
 
#define DEFAULT_ADDR   (0xFFFF)
 
#define DEFAULT_CHANNEL   (11 + DEFAULT_CHANNEL_OFFSET)
 
#define DEFAULT_PAN_ID   (0xCAFE)
 
#define DST_PAN_ID   (DEFAULT_PAN_ID)
 
#define DST_SHORT_ADDR   (0xFFFF)
 
#define DUMMY_PAYLOAD   (0xAA)
 
#define FIRMWARE_VERSION   3.2
 
#define FRAME_OVERHEAD   (11)
 
#define FRAME_OVERHEAD_DST_IEEE_ADDR   (FRAME_OVERHEAD + 6)
 
#define FRAME_OVERHEAD_SRC_IEEE_ADDR   (FRAME_OVERHEAD + 6)
 
#define IC_TYPE   0X00
 
#define OFFSET_FOR_SRC_IEEE_ADDR   (7)
 
#define RX_LED   LED0_GPIO
 
#define SRC_PAN_ID   (DEFAULT_PAN_ID)
 
#define STATUS_LED   LED0_GPIO
 
#define TX_LED   LED0_GPIO
 

Enumerations

enum  main_state_t {
  INIT = 0,
  WAIT_FOR_EVENT,
  PEER_SEARCH_RANGE_TX,
  PEER_SEARCH_PER_TX,
  PEER_SEARCH_RANGE_RX,
  PEER_SEARCH_PER_RX,
  RANGE_TEST_TX_ON,
  RANGE_TEST_TX_OFF,
  SINGLE_NODE_TESTS,
  PER_TEST_INITIATOR,
  PER_TEST_RECEPTOR,
  NUM_MAIN_STATES
}
 

Functions

void app_alert (void)
 
void config_node_ib (void)
 Function to init the information base for device. More...
 
void init_state_init (void *arg)
 Initialization task for INIT STATE. More...
 
void recover_all_settings (void)
 Recover all user settings before Start of CW transmission. More...
 
void save_all_settings (void)
 Save all user settings before Start of CW transmission. More...
 
void set_main_state (main_state_t state, void *arg)
 Function to set the main state of state machine. More...
 
retval_t transmit_frame (uint8_t dst_addr_mode, uint8_t *dst_addr, uint8_t src_addr_mode, uint8_t msdu_handle, uint8_t *payload, uint16_t payload_length, uint8_t ack_req)
 Function to transmit frames as per 802.15.4 std. More...
 
void wait_for_event_init (void *arg)
 Application task when the node is in the WAIT_FOR_EVENT state. More...
 
void wait_for_event_rx_cb (frame_info_t *frame)
 Callback that is called if data has been received by trx in WAIT_FOR_EVENT state. More...
 
void wait_for_event_task (void)
 Application task handling user events like key press or character on UART. More...
 

Variables

uint8_t APP_TIMER_TO_RX_LED_OFF
 
uint8_t APP_TIMER_TO_TX
 
uint8_t APP_TIMER_TO_TX_LED_OFF
 
uint8_t CW_TX_TIMER
 
volatile node_ib_t node_info
 
uint8_t T_APP_TIMER
 
uint8_t T_APP_TIMER_RANGE