API  2.2
TSmarT Software Library
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
dled.c

This is an example showing how to turn on/off the debug led

/*
* @file dled.c
* @author TST
* @version V0.0
* @date 03/07/2012
* @brief DLed example. This is an example showing how to Turn on/off the debug Led
*
*/
#include "tsmart.h"
/*
* Task function. Main process turn on/off the debug led
*
*/
void vDLED_EXAMPLE(void *pvParameters){
for(;;){
vTaskDelay(1000/portTICK_RATE_MS);
vTaskDelay(1000/portTICK_RATE_MS);
}
}
/*
* @brief init() function
*
* This is the first thing that the user must do for using TSmarT.
* It initializes the specific hardware resources (GPRS, GPS, AI, DIO, MODBUS, MSA...)
* and software resources (queues, mutex, tasks...) for the user application.
*
* The way to fill in this function properly is to initialize first
* hardware resources and after that software resources.
*
* This function must return: TSMART_PASS when every thing is OK or
* TSMART_FAIL when a failure happened.
*
* @return
* @arg TSMART_PASS
* @arg TSMART_FAIL
*/
int32_t init() {
/* ************************************************************************* */
/* Debug Mode */
/* ************************************************************************* */
/* ************************************************************************* */
/* Initialize resources */
/* ************************************************************************* */
/* Initialize DLed*/
/* ************************************************************************* */
/* Application task */
/* ************************************************************************* */
/* Create the DLED_EXAMPLE task */
if(xTaskCreate(vDLED_EXAMPLE, "DLED_EXAMPLE", 512, NULL, 7, NULL) != pdPASS){
return TSMART_FAIL;
}
/* Everything OK */
return TSMART_PASS;
}