XDK API  3.6.0
Documentation
Files | Macros | Functions | Variables
LedsAndButtons

LED and Button interfaces of XDK. More...

+ Collaboration diagram for LedsAndButtons:

Files

file  AppController.c
 

Macros

#define BCDS_MODULE_ID   XDK_APP_MODULE_ID_APP_CONTROLLER
 

Functions

void AppController_Init (void *cmdProcessorHandle, uint32_t param2)
 Gives control to the Application controller. More...
 
static void AppControllerEnable (void *param1, uint32_t param2)
 To enable the necessary modules for the application. More...
 
static void AppControllerSetup (void *param1, uint32_t param2)
 To setup the necessary modules for the application. More...
 
static void Button1Callback (ButtonEvent_T buttonEvent)
 Callback for Button 1. More...
 
static void Button2Callback (ButtonEvent_T buttonEvent)
 Callback for Button 2. More...
 

Variables

static CmdProcessor_TAppCmdProcessor
 
static Button_Setup_T ButtonSetup
 

Detailed Description

Demo application to demonstrate how to use the LED and Button interfaces in XDK.

Application usage: As the first step upon proper initialization of LED module application will turn ON the YELLOW LED

Afterwards on Button Press this application makes the LED glow according to the button press/Release event as mentioned below table


BUTTON 1

RED ORANGE YELLOW
Pressed ON OFF ON
Released OFF ON OFF

BUTTON 2

RED ORANGE YELLOW
Pressed ON ON OFF
Released OFF OFF ON

Macro Definition Documentation

#define BCDS_MODULE_ID   XDK_APP_MODULE_ID_APP_CONTROLLER

Function Documentation

void AppController_Init ( void *  cmdProcessorHandle,
uint32_t  param2 
)

This is a template function where the user can write his custom application.

Refer interface header for description

+ Here is the call graph for this function:

static void AppControllerEnable ( void *  param1,
uint32_t  param2 
)
static
  • LED
  • Button
Parameters
[in]param1Unused
[in]param2Unused

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void AppControllerSetup ( void *  param1,
uint32_t  param2 
)
static
  • LED
  • Button
Parameters
[in]param1Unused
[in]param2Unused

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void Button1Callback ( ButtonEvent_T  buttonEvent)
static
Parameters
[in]buttonEventIf it is BUTTON_EVENT_PRESSED, then Red and Yellow LED's are turned ON If it is BUTTON_EVENT_RELEASED, then Orange LED is turned ON

+ Here is the call graph for this function:

static void Button2Callback ( ButtonEvent_T  buttonEvent)
static
Parameters
[in]buttonEventIf it is BUTTON_EVENT_PRESSED, then Red and Orange LED's are turned ON If it is BUTTON_EVENT_RELEASED, then Yellow LED is turned ON

+ Here is the call graph for this function:

Variable Documentation

CmdProcessor_T* AppCmdProcessor
static

Handle to store the main Command processor handle to be used by run-time event driven threads

Button_Setup_T ButtonSetup
static
Initial value:
=
{
.CmdProcessorHandle = NULL,
.InternalButton1isEnabled = true,
.InternalButton2isEnabled = true,
.InternalButton1Callback = Button1Callback,
.InternalButton2Callback = Button2Callback,
}
static void Button2Callback(ButtonEvent_T buttonEvent)
Callback for Button 2.
Definition: AppController.c:193
#define NULL
Definition: BCDS_Basics.h:80
static void Button1Callback(ButtonEvent_T buttonEvent)
Callback for Button 1.
Definition: AppController.c:125

Button setup parameters


All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:54 by doxygen 1.8.8