app_bod.h File Reference

Header file containing functions prototypes of BOD app library. More...

#include "grx_hal.h"
#include "app_drv_error.h"
#include "app_drv_config.h"
+ Include dependency graph for app_bod.h:

Go to the source code of this file.

Classes

struct  app_bod_evt_t
 BOD event structure definition. More...
 
struct  bod_env_t
 BOD device structure definition. More...
 
struct  app_bod_params_t
 BOD parameters structure definition. More...
 

Macros

#define APP_BOD_ENABLE   HAL_BOD_ENABLE
 BOD enable
More...
 
#define APP_BOD_DISABLE   HAL_BOD_DISABLE
 BOD disable
More...
 
#define APP_BOD_EVENT_ENABLE   HAL_BOD2_ENABLE
 BOD event enable
More...
 
#define APP_BOD_EVENT_DISABLE   HAL_BOD2_DISABLE
 BOD event disable
More...
 
#define APP_BOD_STATIC_ENABLE   HAL_BOD_STATIC_ENABLE
 BOD STATIC enable
More...
 
#define APP_BOD_STATIC_DISABLE   HAL_BOD_STATIC_DISABLE
 BOD STATIC disable
More...
 
#define APP_BOD_EVENT_LEVEL_0   HAL_BOD2_LEVEL_0
 BOD event Level 0
More...
 
#define APP_BOD_EVENT_LEVEL_1   HAL_BOD2_LEVEL_1
 BOD event Level 1
More...
 
#define APP_BOD_EVENT_LEVEL_2   HAL_BOD2_LEVEL_2
 BOD event Level 2
More...
 
#define APP_BOD_EVENT_LEVEL_3   HAL_BOD2_LEVEL_3
 BOD event Level 3
More...
 
#define APP_BOD_EVENT_LEVEL_4   HAL_BOD2_LEVEL_4
 BOD event Level 4
More...
 
#define APP_BOD_EVENT_LEVEL_5   HAL_BOD2_LEVEL_5
 BOD event Level 5
More...
 
#define APP_BOD_EVENT_LEVEL_6   HAL_BOD2_LEVEL_6
 BOD event Level 6
More...
 
#define APP_BOD_EVENT_LEVEL_7   HAL_BOD2_LEVEL_7
 BOD event Level 7
More...
 

Typedefs

typedef void(* app_bod_evt_handler_t) (app_bod_evt_t *p_evt)
 BOD event callback definition. More...
 

Enumerations

enum  app_bod_evt_type_t { APP_BOD_EVT_TRIGGERED, APP_BOD_EVT_REMOVED }
 BOD event Enumerations definition. More...
 
enum  app_bod_state_t { APP_BOD_INVALID = 0, APP_BOD_ACTIVITY }
 App bod state types. More...
 

Functions

uint16_t app_bod_init (app_bod_params_t *p_params, app_bod_evt_handler_t evt_handler)
 Initialize the APP BOD DRIVER. More...
 
uint16_t app_bod_deinit (void)
 De-initialize the APP BOD DRIVER. More...
 
uint16_t app_bod_enable (uint8_t enable)
 Enable or disable hardware BOD. More...
 
uint16_t app_bod_event_enable (uint8_t enable)
 Enable or disable BOD Event. More...
 
uint16_t app_bod_event_set_level (uint8_t level)
 Set BOD EVENT control level. More...
 
uint16_t app_bod_static_mode_enable (uint8_t enable)
 Enable or disable static mode. More...
 

Detailed Description

Header file containing functions prototypes of BOD app library.

Author
BLE Driver Team
Attention
Copyright (c) 2019 GOODIX

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of GOODIX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file app_bod.h.