Trident IoT Z-Wave SDK
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
apps_hw.h File Reference
#include <stdint.h>
#include "tr_platform.h"
#include <lpm.h>
#include <gpio.h>
#include <ev_man.h>
+ Include dependency graph for apps_hw.h:

Go to the source code of this file.

Data Structures

struct  _gpio_config_t
 Defines the configuration of a GPIO. More...
 
struct  _gpio_info_t
 Defines the info of a GPIO. More...
 

Macros

#define GPIO_CONFIG(btn, lpwd, func, short_press, hold, long_press, release_pin)
 Macro for setting the configuration of a GPIO.
 
#define GPIO_INFO()
 Macro for setting the info of a GPIO.
 

Typedefs

typedef enum _gpio_state_t gpio_state_t
 Defines the states of a GPIO.
 
typedef uint32_t tr_zw_event_id_t
 Defines an event type.
 
typedef struct _gpio_config_t gpio_config_t
 Defines the configuration of a GPIO.
 
typedef struct _gpio_info_t gpio_info_t
 Defines the info of a GPIO.
 

Enumerations

enum  _gpio_state_t {
  GPIO_DOWN = 0 ,
  GPIO_UP ,
  GPIO_HOLD
}
 Defines the states of a GPIO. More...
 

Functions

void apps_hw_init (const gpio_config_t *p_gpio_config, gpio_info_t *p_gpio_info, uint8_t gpio_size)
 Initializes the application hardware.
 
uint8_t board_indicator_gpio_get (void)
 Returns the GPIO used for CC Indicator.
 
uint8_t board_indicator_led_off_gpio_state (void)
 Returns the GPIO state that defines "off" for the indicator LED.
 

Macro Definition Documentation

◆ GPIO_CONFIG

#define GPIO_CONFIG ( btn,
lpwd,
func,
short_press,
hold,
long_press,
release_pin )
Value:
{ \
.gpio_no = btn, \
.low_power = lpwd, \
.on_value = btn ## _ON, \
.short_event = short_press, \
.hold_event = hold, \
.long_event = long_press, \
.release_event = release_pin, \
}

Macro for setting the configuration of a GPIO.


SPDX-License-Identifier: LicenseRef-TridentMSLA SPDX-FileCopyrightText: 2024 Trident IoT, LLC https://www.tridentiot.com


◆ GPIO_INFO

#define GPIO_INFO ( )
Value:
{ \
.gpio_state = GPIO_UP, \
.gpio_down_count = 0, \
}
@ GPIO_UP
GPIO is up.
Definition apps_hw.h:46

Macro for setting the info of a GPIO.

Typedef Documentation

◆ gpio_config_t

typedef struct _gpio_config_t gpio_config_t

Defines the configuration of a GPIO.

◆ gpio_info_t

typedef struct _gpio_info_t gpio_info_t

Defines the info of a GPIO.

◆ gpio_state_t

Defines the states of a GPIO.

◆ tr_zw_event_id_t

typedef uint32_t tr_zw_event_id_t

Defines an event type.

Enumeration Type Documentation

◆ _gpio_state_t

Defines the states of a GPIO.

Enumerator
GPIO_DOWN 

GPIO is down.

GPIO_UP 

GPIO is up.

GPIO_HOLD 

GPIO is held.

Function Documentation

◆ apps_hw_init()

void apps_hw_init ( const gpio_config_t * p_gpio_config,
gpio_info_t * p_gpio_info,
uint8_t gpio_size )

Initializes the application hardware.

Parameters
[in]p_gpio_configAddress of GPIO configuration.
[in]p_gpio_infoAddress of GPIO info.
[in]gpio_sizeNumber of configured GPIOs.

◆ board_indicator_gpio_get()

uint8_t board_indicator_gpio_get ( void )

Returns the GPIO used for CC Indicator.

Returns
uint8_t GPIO number.

◆ board_indicator_led_off_gpio_state()

uint8_t board_indicator_led_off_gpio_state ( void )

Returns the GPIO state that defines "off" for the indicator LED.

Returns
uint8_t Indicator LED "off" state.