ESP-IDF
CButton
is only used within ESP-IDF.
Symbol previews are coming soon...
Symbols
loading...
Files
loading (2/5)...
Summary
Syntax
Methods
Examples
References
Call Tree
Data Use
Class Tree
Override Tree
Implementations
Instances
Lifecycle
SourceVu
ESP-IDF Framework and Examples
ESP-IDF
CButton
CButton class
class of button simple usage: CButton* btn = new CButton(BUTTON_IO_NUM, BUTTON_ACTIVE_LEVEL, BUTTON_SERIAL_TRIGGER, 3); btn->add_cb(BUTTON_CB_PUSH, button_tap_cb, (void*) push, 50 / portTICK_PERIOD_MS); btn->add_custom_cb(5, button_press_5s_cb, NULL); ...... delete btn;
Syntax
Show:
Summary
Declaration
from
iot_button.h:135
class
CButton
{
private
:
button_handle_t
m_btn_handle
;
CButton
(
const
CButton
&
)
;
CButton
&
operator
=
(
const
CButton
&
)
;
public
:
CButton
(
gpio_num_t
gpio_num
,
button_active_t
active_level
=
BUTTON_ACTIVE_LOW
)
;
~
CButton
(
)
;
esp_err_t
set_evt_cb
(
button_cb_type_t
type
,
button_cb
cb
,
void
*
arg
)
;
esp_err_t
set_serial_cb
(
button_cb
cb
,
void
*
arg
,
TickType_t
interval_tick
,
uint32_t
start_after_sec
)
;
esp_err_t
add_custom_cb
(
uint32_t
press_sec
,
button_cb
cb
,
void
*
arg
)
;
esp_err_t
rm_cb
(
button_cb_type_t
type
)
;
}
;
Fields
Field
Declared as
CButton::m_btn_handle
button_handle_t
Methods
operator=()
set_evt_cb()
Register a callback function for a button_cb_type_t action.
set_serial_cb()
Register a callback function for a serial trigger event.
add_custom_cb()
rm_cb()
Remove callback.
Examples
References
from
examples
Code
Location
Scope
Referrer
class
CButton
iot_button.h:135
CButton
::
CButton
(
gpio_num_t
gpio_num
,
button_active_t
active_level
)
button_obj.cpp:12
CButton::CButton()
CButton
::
~
CButton
(
)
button_obj.cpp:17
CButton::~CButton()
esp_err_t
CButton
::
set_evt_cb
(
button_cb_type_t
type
,
button_cb
cb
,
void
*
arg
)
button_obj.cpp:23
CButton::set_evt_cb()
esp_err_t
CButton
::
set_serial_cb
(
button_cb
cb
,
void
*
arg
,
TickType_t
interval_tick
,
uint32_t
start_after_sec
)
button_obj.cpp:28
CButton::set_serial_cb()
esp_err_t
CButton
::
add_custom_cb
(
uint32_t
press_sec
,
button_cb
cb
,
void
*
arg
)
button_obj.cpp:33
CButton::add_custom_cb()
esp_err_t
CButton
::
rm_cb
(
button_cb_type_t
type
)
button_obj.cpp:38
CButton::rm_cb()
CButton
(
const
CButton
&
)
;
iot_button.h:143
CButton::CButton()
CButton
&
operator
=
(
const
CButton
&
)
;
iot_button.h:144
CButton
CButton::operator=()
Call Tree
from
examples
All items filtered out
All items filtered out
Data Use
from
examples
All items filtered out
All items filtered out
Class Tree
from
examples
All items filtered out
All items filtered out
Override Tree
from
examples
All items filtered out
All items filtered out
Implementations
from
examples
All items filtered out
All items filtered out
Instances
from
examples
Instance
Scope
Location
Project
return
CButton::operator=()
iot_button.h:144
CButton::operator=()::#0
CButton::operator=()
iot_button.h:144
Lifecycle
from
examples
All items filtered out
All items filtered out