summaryrefslogtreecommitdiff
path: root/digital/beacon/src/Bitcloud_stack/Components/BSP/RCB/include/bspTaskManager.h
blob: 2bd88abb75f6386731c1c04eb87abe77b688e5c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/**************************************************************************//**
\file  bspTaslManager.h

\brief Declarations of enums and functions of BSP task manager.

\author
    Atmel Corporation: http://www.atmel.com \n
    Support email: avr@atmel.com

  Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
  Licensed under Atmel's Limited License Agreement (BitCloudTM).

\internal
  History:
    26.08.09 A. Taradov - Created
*******************************************************************************/

#ifndef _BSPTASKHANDLER_H
#define _BSPTASKHANDLER_H

/******************************************************************************
                   Includes section
******************************************************************************/
// \cond
#include <types.h>
#include <taskManager.h>
// \endcond

/******************************************************************************
                   Define(s) section
******************************************************************************/
enum
{
  BSP_BUTTONS      = (uint8_t)1 << 0,
  BSP_TEMPERATURE  = (uint8_t)1 << 1,
  BSP_LIGHT        = (uint8_t)1 << 2,
  BSP_BATTERY      = (uint8_t)1 << 3,
};

/******************************************************************************
                   External variables section
******************************************************************************/
extern volatile uint8_t bspTaskFlags;

/******************************************************************************
                   Inline static functions section
******************************************************************************/
/***************************************************************************//**
\brief posting bsp task for task manager.
\param[in]
  flag - task number
*******************************************************************************/
INLINE void bspPostTask(uint8_t flag)
{
  bspTaskFlags |= flag;
  SYS_PostTask(BSP_TASK_ID);
}

#endif /* _BSPTASKHANDLER_H */
// eof bspTaskManager.h