| BlueNRG-1 HAL drivers APIs

- Main Page
- Classes
- Files

- File List
- File Members

Macros | Typedefs | Enumerations
hal_types.h File Reference

Header file that includes hal types for BlueNRG-1 SoC. More...

`#include <stdint.h>`

Go to the source code of this file.

## Macros

#define | TRUE 1
| TRUE, FALSE definition. More...
#define | FALSE 0
#define | IS_FLAGSTATUS(STATE) (((STATE) == RESET) || ((STATE) == SET))
| Macro that checks if STATE is a FlagStatus / ITStatus. More...
#define | IS_ITSTATUS(STATE) IS_FLAGSTATUS(STATE)
#define | IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
| Macro that checks if STATE is a FunctionalState. More...
#define | IS_ERROR_STATE(STATE) (((STATE) == SUCCESS) || ((STATE) == ERROR))
| Macro that checks if STATE is a ErrorStatus. More...
#define | HOST_TO_LE_16(buf, val)
| Macro that stores Value into a buffer in Little Endian Format (2 bytes) More...
#define | LE_TO_HOST_32(ptr)
| Macro that stores Little Endian Format into a buffer value. More...
#define | HOST_TO_LE_32(buf, val)
| Macro that stores Value into a buffer in Little Endian Format (4 bytes) More...

## Typedefs

typedef enum FlagStatus | ITStatus
typedef uint8_t | BOOL
| Booelan definition. More...

## Enumerations

enum | FlagStatus { RESET = 0, SET }
| RESET,SET definition. More...
enum | FunctionalState { DISABLE = 0, ENABLE }
| DISABLE, ENABLE definition. More...
enum | ErrorStatus { SUCCESS = 0, ERROR }

## Detailed Description

Header file that includes hal types for BlueNRG-1 SoC.

Author
  AMS - VMA RF Application team

Version
  V1.0.0

Date
  21-Sept-2015

Attention

THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.

##
© COPYRIGHT 2015 STMicroelectronics

Definition in file hal_types.h.

## Macro Definition Documentation

#define FALSE 0

Definition at line 28 of file hal_types.h.

#define HOST_TO_LE_16 | ( |  | buf,
|  |  | val
| ) |  |

Value:
( ((buf)[0] = (uint8_t) (val) ) , \
((buf)[1] = (uint8_t) (val>>8) ) )

Macro that stores Value into a buffer in Little Endian Format (2 bytes)

Definition at line 47 of file hal_types.h.

#define HOST_TO_LE_32 | ( |  | buf,
|  |  | val
| ) |  |

Value:
( ((buf)[0] = (uint8_t) (val) ) , \
((buf)[1] = (uint8_t) (val>>8) ) , \
((buf)[2] = (uint8_t) (val>>16) ) , \
((buf)[3] = (uint8_t) (val>>24) ) )

Macro that stores Value into a buffer in Little Endian Format (4 bytes)

Definition at line 61 of file hal_types.h.

#define IS_ERROR_STATE | ( |  | STATE | ) | (((STATE) == SUCCESS) || ((STATE) == ERROR))

Macro that checks if STATE is a ErrorStatus.

Definition at line 43 of file hal_types.h.

#define IS_FLAGSTATUS | ( |  | STATE | ) | (((STATE) == RESET) || ((STATE) == SET))

Macro that checks if STATE is a FlagStatus / ITStatus.

Definition at line 33 of file hal_types.h.

#define IS_FUNCTIONAL_STATE | ( |  | STATE | ) | (((STATE) == DISABLE) || ((STATE) == ENABLE))

Macro that checks if STATE is a FunctionalState.

Definition at line 39 of file hal_types.h.

#define IS_ITSTATUS | ( |  | STATE | ) | IS_FLAGSTATUS(STATE)

Definition at line 34 of file hal_types.h.

#define LE_TO_HOST_32 | ( |  | ptr | ) |

Value:
(uint32_t) ( ((uint32_t) \
*((uint8_t *)ptr)) | \
((uint32_t) \
*((uint8_t *)ptr + 1) << 8) | \
((uint32_t) \
*((uint8_t *)ptr + 2) << 16) | \
((uint32_t) \
*((uint8_t *)ptr + 3) << 24) )

Macro that stores Little Endian Format into a buffer value.

Definition at line 51 of file hal_types.h.

#define TRUE 1

TRUE, FALSE definition.

Definition at line 27 of file hal_types.h.

## Typedef Documentation

typedef uint8_t BOOL

Booelan definition.

Definition at line 67 of file hal_types.h.

typedef enum FlagStatus ITStatus

## Enumeration Type Documentation

enum ErrorStatus

Enumerator
SUCCESS |
ERROR |

Definition at line 41 of file hal_types.h.

enum FlagStatus

RESET,SET definition.

Enumerator
RESET |
SET |

Definition at line 31 of file hal_types.h.

enum FunctionalState

DISABLE, ENABLE definition.

Enumerator
DISABLE |
ENABLE |

Definition at line 37 of file hal_types.h.