1 / 15

Application Queue API

Application Queue API. FT-6200. FT-6200 High-Power ZigBee Starter Kit FT-6250 Base Development Board FT-6251 Sensor Development Board Jennic SDK JN-SW-4027 SDK with CLI DIO Ft6200-Patch-ba-1v0.exe FontalBSP. Environment. When you build up your environment BoardAPI FontalBSP

aira
Download Presentation

Application Queue API

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Application Queue API

  2. FT-6200 • FT-6200 High-Power ZigBee Starter Kit • FT-6250 Base Development Board • FT-6251 Sensor Development Board • Jennic SDK • JN-SW-4027 SDK with CLI • DIO • Ft6200-Patch-ba-1v0.exe • FontalBSP

  3. Environment • When you build up your environment • BoardAPI • FontalBSP • FontalButton, FontalLED • HardwareAPI • Stack – 802.15.4 MAC • Application Queue API • Service Access Point – AppApi.h • Access functions and structures used by the application to interact with the Jennic 802.15.4 stack

  4. MAC/Network layer interface

  5. Application API • u32AppApiInit • Communication from the MAC up to the application or network layer • Callback routines implemented by the upper layer • Registered with the MAC • A general interrupt handler can be registered during the initialization of the application API

  6. MLME/MCPS to NWK

  7. Application Queue API

  8. Application Queue API • The Application Queue API handles interrupts coming from • The MAC sub-layer of the IEEE 802.15.4 stack • The integrated peripherals of the wireless microcontroller • The API implements a queue for each of three types of interrupt • MCPS (MAC Data Services) interrupts coming from the stack • MLME (MAC Management Services) interrupts coming from the stack • Hardware interrupts coming from the hardware drivers

  9. Application Queue API • The Application Queue API allows callbacks to be defined by the application • As with the normal IEEE 802.15.4 Stack API

  10. u32AppQApiInit • u32AppQApiInit • Init the Application Queue API, as well as the underlying 802.15.4 Stack API • The function creates there queues • MLME indications and confirmations • MCPS indications and confirmations • Integrated Peripherals API indications • The function refers to callback functions for the three queues

  11. Polling Queue • MLME • PUBLIC MAC_MlmeDcfmInd_s *psAppQApiReadMlmeInd(void); • PUBLIC void vAppQApiReturnMlmeIndBuffer(MAC_MlmeDcfmInd_s *psBuffer); • Return MLME buffer previously passed • MCPS • PUBLIC MAC_McpsDcfmInd_s *psAppQApiReadMcpsInd(void); • PUBLIC void vAppQApiReturnMcpsIndBuffer(MAC_McpsDcfmInd_s *psBuffer); • Return MCPS buffer previously passed

  12. Polling Queue • Allows the application to return a hardware event buffer previously passed up to the application from the Integrated Peripherals API • Once returned, the buffer can be re-used to store and pass another message typedef struct { uint32 u32DeviceId; uint32 u32ItemBitmap; } AppQApiHwInd_s;

  13. Lab3 sample code PRIVATE void InitSystem(void) { u32AHI_Init(); u32AppQApiInit(NULL, NULL, vTickTimerISR); led_init(); led_on(LED0); led_on(LED1); vAHI_TickTimerConfigure(E_AHI_TICK_TIMER_RESTART); vAHI_TickTimerWrite(0); vAHI_TickTimerInterval((16*1000*1000) / 2); vAHI_TickTimerIntEnable(TRUE); }

  14. Lab3 sample code PUBLIC void AppColdStart(void) { InitSystem(); while (TRUE); } PRIVATE void InitSystem(void) { // Jennic Hardware init u32AHI_Init(); u32AppQApiInit(NULL,NULL, vSystemISR); // ====== init button and led's DIO ====== led_init(); btn_init(); // ================================= } PRIVATE void vSystemISR() { AppQApiHwInd_s *buffer= psAppQApiReadHwInd(); switch (buffer->u32DeviceId) { case E_AHI_DEVICE_SYSCTRL: if (btn_pressed(BUTTON0)) led_toggle(LED0); else if (btn_pressed(BUTTON1)) led_toggle(LED1); break; default: break; } vAppQApiReturnHwIndBuffer(buffer); }

  15. Lab • Using the Application Queue API to achieve the requirement of Lab2

More Related