Home
last modified time | relevance | path

Searched refs:onoff (Results 1 – 25 of 47) sorted by relevance

12

/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_server/main/
Dmain.c119 esp_ble_mesh_msg_ctx_t *ctx, uint8_t onoff) in example_change_led_state() argument
130 board_led_operation(led->pin, onoff); in example_change_led_state()
136 board_led_operation(led->pin, onoff); in example_change_led_state()
140 board_led_operation(led->pin, onoff); in example_change_led_state()
153 ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_STATUS, sizeof(srv->state.onoff), &srv->state.onoff); in example_handle_gen_onoff_msg()
158 srv->state.onoff = set->onoff; in example_handle_gen_onoff_msg()
161 srv->state.onoff = set->onoff; in example_handle_gen_onoff_msg()
165 … ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_STATUS, sizeof(srv->state.onoff), &srv->state.onoff); in example_handle_gen_onoff_msg()
168 sizeof(srv->state.onoff), &srv->state.onoff, ROLE_NODE); in example_handle_gen_onoff_msg()
169 example_change_led_state(model, ctx, srv->state.onoff); in example_handle_gen_onoff_msg()
[all …]
Dboard.c24 void board_led_operation(uint8_t pin, uint8_t onoff) in board_led_operation() argument
30 if (onoff == led_state[i].previous) { in board_led_operation()
32 led_state[i].name, (onoff ? "on" : "off")); in board_led_operation()
35 gpio_set_level(pin, onoff); in board_led_operation()
36 led_state[i].previous = onoff; in board_led_operation()
Dboard.h42 void board_led_operation(uint8_t pin, uint8_t onoff);
/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/aligenie_demo/main/
Daligenie_demo.c288 g_elem_state[i].state.onoff[VALUE_TYPE_CUR] = GENIE_ONOFF_DEFAULT; in reset_light_para()
289 g_elem_state[i].state.onoff[VALUE_TYPE_TAR] = GENIE_ONOFF_DEFAULT; in reset_light_para()
365 g_elem_state[i].state.onoff[VALUE_TYPE_TAR] = 0; in load_light_state()
367 g_elem_state[i].state.onoff[VALUE_TYPE_TAR] = 1; in load_light_state()
371 if (g_elem_state[i].state.onoff[VALUE_TYPE_TAR] == 0) { in load_light_state()
413 g_elem_state[0].state.onoff[VALUE_TYPE_TAR] = 1; in user_genie_event_handle()
447 ESP_LOGI(TAG, "onoff: %d", p_elem->state.onoff[VALUE_TYPE_CUR]); in user_genie_event_handle()
448 board_led_switch(p_elem->elem_index, p_elem->state.onoff[VALUE_TYPE_CUR]); in user_genie_event_handle()
465 g_elem_state[0].state.onoff[VALUE_TYPE_TAR] = !g_elem_state[0].state.onoff[VALUE_TYPE_TAR]; in user_genie_event_handle()
566 if (p_state->onoff[VALUE_TYPE_TAR] == 0) { in bind_onoff_with_hsl()
[all …]
Dboard.c133 void board_led_switch(uint8_t elem_index, uint8_t onoff) in board_led_switch() argument
137 ESP_LOGD(TAG, "onoff last state %d, state %d", last_onoff, onoff); in board_led_switch()
138 if(last_onoff != onoff) { in board_led_switch()
139 last_onoff = onoff; in board_led_switch()
/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/ble_mesh_sensor_model/sensor_server/main/
Dboard.c23 void board_led_operation(uint8_t pin, uint8_t onoff) in board_led_operation() argument
29 if (onoff == led_state[i].previous) { in board_led_operation()
31 led_state[i].name, (onoff ? "on" : "off")); in board_led_operation()
34 gpio_set_level(pin, onoff); in board_led_operation()
35 led_state[i].previous = onoff; in board_led_operation()
Dboard.h42 void board_led_operation(uint8_t pin, uint8_t onoff);
/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_server/main/
Dboard.c23 void board_led_operation(uint8_t pin, uint8_t onoff) in board_led_operation() argument
29 if (onoff == led_state[i].previous) { in board_led_operation()
31 led_state[i].name, (onoff ? "on" : "off")); in board_led_operation()
34 gpio_set_level(pin, onoff); in board_led_operation()
35 led_state[i].previous = onoff; in board_led_operation()
/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/ble_mesh_fast_provision/fast_prov_server/main/
Dboard.c39 void board_led_operation(uint8_t pin, uint8_t onoff) in board_led_operation() argument
45 if (onoff == led_state[i].previous) { in board_led_operation()
47 led_state[i].name, (onoff ? "on" : "off")); in board_led_operation()
50 gpio_set_level(pin, onoff); in board_led_operation()
51 led_state[i].previous = onoff; in board_led_operation()
Dmain.c160 static void example_change_led_state(uint8_t onoff) in example_change_led_state() argument
164 board_led_operation(led->pin, onoff); in example_change_led_state()
680 ESP_LOGI(TAG, "onoff 0x%02x", param->value.state_change.onoff_set.onoff); in example_ble_mesh_generic_server_cb()
681 example_change_led_state(param->value.state_change.onoff_set.onoff); in example_ble_mesh_generic_server_cb()
/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/ble_mesh_wifi_coexist/main/
Dboard.c39 void board_led_operation(uint8_t pin, uint8_t onoff) in board_led_operation() argument
45 if (onoff == led_state[i].previous) { in board_led_operation()
47 led_state[i].name, (onoff ? "on" : "off")); in board_led_operation()
50 gpio_set_level(pin, onoff); in board_led_operation()
51 led_state[i].previous = onoff; in board_led_operation()
/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/ble_mesh_node/onoff_client/main/
Dboard.c31 void board_led_operation(uint8_t pin, uint8_t onoff) in board_led_operation() argument
37 if (onoff == led_state[i].previous) { in board_led_operation()
39 led_state[i].name, (onoff ? "on" : "off")); in board_led_operation()
42 gpio_set_level(pin, onoff); in board_led_operation()
43 led_state[i].previous = onoff; in board_led_operation()
Dmain.c35 uint8_t onoff; /* Remote OnOff */ member
40 .onoff = LED_OFF,
116 store.net_idx, store.app_idx, store.onoff, store.tid); in mesh_example_info_restore()
188 set.onoff_set.onoff = store.onoff; in example_ble_mesh_send_gen_onoff_set()
197 store.onoff = !store.onoff; in example_ble_mesh_send_gen_onoff_set()
Dboard.h43 void board_led_operation(uint8_t pin, uint8_t onoff);
/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/ble_mesh_provisioner/main/
Dmain.c49 uint8_t onoff; member
56 .onoff = LED_OFF,
132 nodes[i].onoff = onoff_state; in example_ble_mesh_store_node_info()
142 nodes[i].onoff = onoff_state; in example_ble_mesh_store_node_info()
516 node->onoff = param->status_cb.onoff_status.present_onoff; in example_ble_mesh_generic_client_cb()
517 ESP_LOGI(TAG, "ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_GET onoff: 0x%02x", node->onoff); in example_ble_mesh_generic_client_cb()
521 set_state.onoff_set.onoff = !node->onoff; in example_ble_mesh_generic_client_cb()
537 node->onoff = param->status_cb.onoff_status.present_onoff; in example_ble_mesh_generic_client_cb()
538 ESP_LOGI(TAG, "ESP_BLE_MESH_MODEL_OP_GEN_ONOFF_SET onoff: 0x%02x", node->onoff); in example_ble_mesh_generic_client_cb()
561 node->onoff = param->status_cb.onoff_status.present_onoff; in example_ble_mesh_generic_client_cb()
[all …]
/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/aligenie_demo/components/vendor_model/
Dgenie_event.c367 …ESP_LOGD(TAG, "onoff cur(%d) tar(%d)", p_elem->state.onoff[VALUE_TYPE_CUR], p_elem->state.onoff[VA… in genie_event_handle_action_done()
368 if (p_elem->state.onoff[VALUE_TYPE_CUR] != p_elem->state.onoff[VALUE_TYPE_TAR]) { in genie_event_handle_action_done()
369 p_elem->state.onoff[VALUE_TYPE_CUR] = p_elem->state.onoff[VALUE_TYPE_TAR]; in genie_event_handle_action_done()
474 g_elem_state[0].state.onoff[VALUE_TYPE_TAR] = attr_data->para; in genie_event_handle_order_msg()
Dgenie_mesh.c101 if (p_state->onoff[VALUE_TYPE_CUR] == 0 && p_state->onoff[VALUE_TYPE_TAR] == 1) { in calc_cur_state()
102 p_state->onoff[VALUE_TYPE_CUR] = 1; in calc_cur_state()
103 } else if (p_state->onoff[VALUE_TYPE_CUR] == 1 && p_state->onoff[VALUE_TYPE_TAR] == 0) { in calc_cur_state()
108 p_state->onoff[VALUE_TYPE_CUR] = 0; in calc_cur_state()
135 …_LOGI(TAG, "next: %d->%d|%02x->%02x|%02x->%02x", p_state->onoff[VALUE_TYPE_CUR], p_state->onoff[VA… in calc_cur_state()
139 if (p_state->onoff[VALUE_TYPE_CUR] == p_state->onoff[VALUE_TYPE_TAR]) in calc_cur_state()
153 p_state->onoff[VALUE_TYPE_CUR] = p_state->onoff[VALUE_TYPE_TAR]; in calc_cur_state()
862 buff[i++] = p_elem->state.onoff[VALUE_TYPE_CUR]; in genie_standart_indication()
969 p_elem[i].state.onoff[VALUE_TYPE_TAR] = GENIE_ONOFF_DEFAULT; in elem_state_init()
/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/
Dble_mesh_register_cmd.c183 … ESP_LOGI(TAG, "GenOnOffServer:SetStatus,OK,%d", param->value.state_change.onoff_set.onoff); in ble_mesh_generic_server_model_cb()
184 ble_mesh_node_set_state(param->value.state_change.onoff_set.onoff); in ble_mesh_generic_server_model_cb()
186 … ESP_LOGI(TAG, "GenOnOffServer:SetUnAck,OK,%d", param->value.state_change.onoff_set.onoff); in ble_mesh_generic_server_model_cb()
187 ble_mesh_node_set_state(param->value.state_change.onoff_set.onoff); in ble_mesh_generic_server_model_cb()
206 if (param->value.set.onoff.op_en == false) { in ble_mesh_generic_server_model_cb()
207 srv->state.onoff = param->value.set.onoff.onoff; in ble_mesh_generic_server_model_cb()
210 srv->state.onoff = param->value.set.onoff.onoff; in ble_mesh_generic_server_model_cb()
216 ESP_LOGI(TAG, "GenOnOffServer:SetStatus,OK,%d", param->value.set.onoff.onoff); in ble_mesh_generic_server_model_cb()
217 ble_mesh_node_set_state(param->value.set.onoff.onoff); in ble_mesh_generic_server_model_cb()
223 ble_mesh_node_set_state(param->value.set.onoff.onoff); in ble_mesh_generic_server_model_cb()
[all …]
/hal_espressif-3.4.0/examples/bluetooth/esp_ble_mesh/common_components/fast_provisioning/
Dble_mesh_fast_prov_operation.c39 .onoff = LED_OFF,
54 uint16_t app_idx, uint8_t onoff) in example_store_node_info() argument
71 node->onoff = onoff; in example_store_node_info()
85 node->onoff = onoff; in example_store_node_info()
393 uint8_t onoff, uint8_t tid, bool need_ack) in example_send_generic_onoff_set() argument
402 set.onoff_set.onoff = onoff; in example_send_generic_onoff_set()
Dble_mesh_fast_prov_operation.h22 uint16_t app_idx, uint8_t onoff);
48 uint8_t onoff, uint8_t tid, bool need_ack);
/hal_espressif-3.4.0/components/bt/esp_ble_mesh/mesh_models/server/include/
Dstate_binding.h38 uint8_t onoff; member
80 uint8_t onoff; member
Dgeneric_server.h19 uint8_t onoff; member
210 uint8_t onoff; member
282 uint8_t onoff; member
/hal_espressif-3.4.0/components/bt/esp_ble_mesh/mesh_models/server/
Dstate_transition.c258 change.gen_onoff_set.onoff = srv->state.onoff; in generic_onoff_work_handler()
270 srv->state.onoff = BLE_MESH_STATE_ON; in generic_onoff_work_handler()
271 change.gen_onoff_set.onoff = srv->state.onoff; in generic_onoff_work_handler()
288 srv->state.onoff = srv->state.target_onoff; in generic_onoff_work_handler()
290 change.gen_onoff_set.onoff = srv->state.onoff; in generic_onoff_work_handler()
916 change.lc_light_onoff_set.onoff = srv->lc->state.light_onoff; in light_lc_work_handler()
930 .lc_light_onoff_set.onoff = srv->lc->state.light_onoff, in light_lc_work_handler()
950 change.lc_light_onoff_set.onoff = srv->lc->state.light_onoff; in light_lc_work_handler()
Dstate_binding.c117 srv->state.onoff = value->gen_onoff.onoff; in bt_mesh_update_binding_state()
355 srv->lc->state.light_onoff = value->light_lc_light_onoff.onoff; in bt_mesh_update_binding_state()
/hal_espressif-3.4.0/components/bt/esp_ble_mesh/api/models/include/
Desp_ble_mesh_generic_model_api.h157 uint8_t onoff; /*!< Target value of Generic OnOff state */ member
770 uint8_t onoff; /*!< The present value of the Generic OnOff state */ member
978 uint8_t onoff; /*!< The value of Generic OnOff state */ member
1113 uint8_t onoff; /*!< Target value of Generic OnOff state */ member
1215 …esp_ble_mesh_server_recv_gen_onoff_set_t onoff; /*!< Generic OnOff Set… member

12