|
SDK สำหรับ TESAIoT Dev Kit
คู่มืออ้างอิง API และ Tutorial (ModusToolbox)
|
#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Functions | |
| void | nus_protocol_init (void) |
| init ครั้งเดียวสำหรับใช้ภายใน — ble_nus_init() ทำให้แล้ว ห้ามเรียกโดยตรง | |
| void | nus_on_rx_bytes (const uint8_t *buf, size_t len) |
| ป้อนไบต์จาก NUS RX ให้ตัวประกอบเฟรม ใช้ newline คั่นเฟรม ล้นที่ 4 KB แล้ว RESYNC | |
| void | nus_protocol_tick (uint32_t now_ms) |
| watchdog แบบ keepalive 30 s ที่ทำงานเชิงรับ ให้เรียกที่ราว 10 Hz ไม่มีผู้เรียกที่ใดเลย | |
| void | nus_protocol_send_permission (const char *id, size_t id_len, int decision_approve) |
| ส่งเฟรม permission ของ id คำถามยืนยันที่เก็บไว้ หลังจากมีการตัดสินใจของมนุษย์แล้ว ไม่มีผู้เรียกที่ใดเลย | |
| void | nus_protocol_set_link_encrypted (int encrypted) |
| เป็นของภายใน stack: ถูกตั้งค่าจาก handler ของ BTM_ENCRYPTION_STATUS_EVT | |