Microchip® Advanced Software Framework

vendor_data.c File Reference

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 uint16_t get_batmon_voltage ( void  )
static

References tfa_get_batmon_voltage().

Referenced by vendor_data_ind().

static void vendor_data_confirm ( nwk_enum_t  Status,
uint8_t  PairingRef,
profile_id_t  ProfileId,
uint8_t  Handle 
)
static
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.

Parameters
PairingRefPairing reference of the recipient of the transmission
ProfileIdProfile id used for the transmission
VendorIdVendor id used for the transmission
nsduLengthLength of the payload data
nsduPointer to the payload data
TxOptionsTransit options
Returns
true if command could be handled; else false

References FUNC_PTR, nlde_data_request(), PROFILE_ID_ZRC, and vendor_data_confirm().