Implementation of vendor-specific data handling.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include <stdio.h>
#include "rf4ce.h"
#include "zrc.h"
#include "vendor_data.h"
#include "pal.h"
#include "tal.h"
#include "app_config.h"
#include "tfa.h"
Macros | |
#define | FW_VERSION_MAJOR (0x02) |
#define | FW_VERSION_MINOR (0x00) |
#define | FW_VERSION_REV (0x00) |
#define | IMAGE_SIZE ((uint32_t)60 * 1024) |
#define | IMAGE_START_ADDR ((uint32_t)60 * 1024) |
Functions | |
FLASH_EXTERN (uint16_t VendorIdentifier) | |
static uint16_t | get_batmon_voltage (void) |
void | nlme_rx_enable_confirm (nwk_enum_t Status) |
static void | vendor_data_confirm (nwk_enum_t Status, uint8_t PairingRef, profile_id_t ProfileId, uint8_t Handle) |
void | vendor_data_ind (uint8_t PairingRef, uint16_t VendorId, uint8_t nsduLength, uint8_t *nsdu, uint8_t RxLinkQuality, uint8_t RxFlags) |
bool | vendor_data_request (uint8_t PairingRef, profile_id_t ProfileId, uint16_t VendorId, uint8_t nsduLength, uint8_t *nsdu, uint8_t TxOptions) |
Vendor data request. More... | |
#define FW_VERSION_MAJOR (0x02) |
Referenced by vendor_data_ind().
#define FW_VERSION_MINOR (0x00) |
Referenced by vendor_data_ind().
#define FW_VERSION_REV (0x00) |
Referenced by vendor_data_ind().
#define IMAGE_SIZE ((uint32_t)60 * 1024) |
Referenced by vendor_data_confirm().
#define IMAGE_START_ADDR ((uint32_t)60 * 1024) |
Referenced by vendor_data_confirm().
FLASH_EXTERN | ( | uint16_t | VendorIdentifier | ) |
|
static |
References tfa_get_batmon_voltage().
Referenced by vendor_data_ind().
void nlme_rx_enable_confirm | ( | nwk_enum_t | Status | ) |
References COLD_START, extended_delay_ms(), IDLE, indicate_fault_behavior(), LED0, LED1, LED2, LED_Off, LED_On, node_status, NWK_SUCCESS, and WARM_START.
Referenced by nlme_reset_confirm(), pbp_org_pair_confirm(), vendor_data_ind(), and zrc_cmd_disc_confirm().
|
static |
References IMAGE_SIZE, and IMAGE_START_ADDR.
Referenced by vendor_data_ind(), and vendor_data_request().
void vendor_data_ind | ( | uint8_t | PairingRef, |
uint16_t | VendorId, | ||
uint8_t | nsduLength, | ||
uint8_t * | nsdu, | ||
uint8_t | RxLinkQuality, | ||
uint8_t | RxFlags | ||
) |
References ALIVE_REQ, ALIVE_RESP, BATTERY_STATUS_REQ, BATTERY_STATUS_RESP, FUNC_PTR, FW_DATA_RESP, FW_VERSION_MAJOR, FW_VERSION_MINOR, FW_VERSION_REQ, FW_VERSION_RESP, FW_VERSION_REV, get_batmon_voltage(), nlde_data_request(), nlme_rx_enable_confirm(), nlme_rx_enable_request(), PGM_READ_WORD, PROFILE_ID_ZRC, RX_FLAG_WITH_SEC, RX_ON_REQ, RX_ON_RESP, TXO_ACK_REQ, TXO_CH_NOT_SPEC, TXO_DST_ADDR_NET, TXO_MULTI_CH, TXO_SEC_REQ, TXO_UNICAST, TXO_VEND_SPEC, VD_NOT_SUPPORTED_ATTRIBUTE, vendor_app_alive_req(), and vendor_data_confirm().
Referenced by main().
bool vendor_data_request | ( | uint8_t | PairingRef, |
profile_id_t | ProfileId, | ||
uint16_t | VendorId, | ||
uint8_t | nsduLength, | ||
uint8_t * | nsdu, | ||
uint8_t | TxOptions | ||
) |
Vendor data request.
The vendor data request allows a device to send a vendor specific data frame.
PairingRef | Pairing reference of the recipient of the transmission |
ProfileId | Profile id used for the transmission |
VendorId | Vendor id used for the transmission |
nsduLength | Length of the payload data |
nsdu | Pointer to the payload data |
TxOptions | Transit options |
References FUNC_PTR, nlde_data_request(), PROFILE_ID_ZRC, and vendor_data_confirm().