Bosch XDK110 General Information Manual page 47

Cross-domain development kit platform for application development
Hide thumbs Also See for XDK110:
Table of Contents

Advertisement

!
4.2.3 Software Example
This example outlines how to realize LED blinking functionality on the XDK Extension Bus.
Code 5: Led task
#include "BCDS_MCU_GPIO.h"
#include "BCDS_MCU_GPIO_Handle.h"
void
extensionLedTask(void)
{
MCU_GPIO_Handle_T
/* initialize local variables */
int
count = 0;
GPIOA.Port = gpioPortA;
GPIOA.Pin = 1;
GPIOA.Mode = gpioModePushPull;
GPIOA.InitialState = MCU_GPIO_PIN_STATE_HIGH;
/* Initialization activities for PTD driver */
MCU_GPIO_Initialize(&GPIOA);
/* blinking functionality */
while(count < 10)
{
/* Set data out register for the pin to 1 */
MCU_GPIO_WritePin(&GPIOA,MCU_GPIO_PIN_STATE_HIGH);
vTaskDelay
/* use suitable delay API. This delay API is for demo only. */
/* Set data out register for the pin to 0 */
MCU_GPIO_WritePin(&GPIOA,MCU_GPIO_PIN_STATE_LOW);
vTaskDelay(1000);
/* use suitable delay API. This delay API is for demo only. */
count++;
}
}
void appInitSystem(void
{
if
(CmdProcessorHandle == NULL)
{
printf("Command processor handle is null \n\r");
assert(false);
}
BCDS_UNUSED(param2);
extensionLedTask();
}
XDK110
© Bosch Connected Devices and Solutions GmbH reserves all rights even in the event of industrial property rights. We reserve all rights of disposal such as
copying and passing on to third parties. BOSCH and the symbol are registered trademarks of Robert Bosch GmbH, Germany.
Note: Specifications within this document are subject to change without notice.
General Information Guide XDK110
GPIOA;
(1000);
* CmdProcessorHandle,
uint32_t
param2)
Page ! 4 7
BCDS

Advertisement

Table of Contents
loading

Table of Contents