Programa WARIIOT AIDI421 clase C.
Dependencies: libxDot-mbed5
Fork of mDot_claseC by
Diff: dot_util.h
- Revision:
- 0:293d4729cd57
diff -r 000000000000 -r 293d4729cd57 dot_util.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dot_util.h Wed Jun 03 15:25:22 2020 +0000 @@ -0,0 +1,44 @@ +#ifndef __DOT_UTIL_H__ +#define __DOT_UTIL_H__ + +#include "mbed.h" +#include "mDot.h" +#include "ChannelPlans.h" +#include "MTSLog.h" +#include "MTSText.h" + + +extern mDot* dot; + +void display_config(); + +void update_ota_config_name_phrase(std::string network_name, std::string network_passphrase, uint8_t frequency_sub_band, lora::NetworkType network_type, uint8_t ack); + +void update_ota_config_id_key(uint8_t *network_id, uint8_t *network_key, uint8_t frequency_sub_band, lora::NetworkType public_network, uint8_t ack); + +void update_manual_config(uint8_t *network_address, uint8_t *network_session_key, uint8_t *data_session_key, uint8_t frequency_sub_band, lora::NetworkType network_type, uint8_t ack); + +void update_peer_to_peer_config(uint8_t *network_address, uint8_t *network_session_key, uint8_t *data_session_key, uint32_t tx_frequency, uint8_t tx_datarate, uint8_t tx_power); + +void update_network_link_check_config(uint8_t link_check_count, uint8_t link_check_threshold); + +//void join_network(); +void join_network(uint32_t delay_s); + +void sleep_wake_rtc_only(bool deepsleep, uint32_t time_sleep_s); + +void sleep_wake_interrupt_only(bool deepsleep); + +//void sleep_wake_rtc_or_interrupt(bool deepsleep); +void sleep_wake_rtc_or_interrupt(bool deepsleep, uint32_t time_sleep_s); + +void sleep_save_io(); + +void sleep_configure_io(); + +void sleep_restore_io(); + +int send_data(std::vector<uint8_t> data); + +#endif +