|
MetaWear C++ API
0.20.0
C++ implementation of the MetaWear protocol
|
Testing and debug functions, for advanced users only. More...
#include <stdint.h>#include "data.h"#include "metawearboard_fwd.h"#include "datasignal_fwd.h"#include "metawear/platform/dllmarker.h"Go to the source code of this file.
Functions | |
| METAWEAR_API void | mbl_mw_debug_reset (const MblMwMetaWearBoard *board) |
| Issues a soft reset. More... | |
| METAWEAR_API void | mbl_mw_debug_jump_to_bootloader (const MblMwMetaWearBoard *board) |
| Restarts the board in bootloader mode. More... | |
| METAWEAR_API void | mbl_mw_debug_disconnect (const MblMwMetaWearBoard *board) |
| Instructs the board to terminate the connection. More... | |
| METAWEAR_API void | mbl_mw_debug_reset_after_gc (const MblMwMetaWearBoard *board) |
| Restarts the board after performing garbage collection. More... | |
| METAWEAR_API void | mbl_mw_debug_enable_power_save (const MblMwMetaWearBoard *board) |
| Places the board in a powered down state after the next reset. More... | |
| METAWEAR_API void | mbl_mw_debug_set_stack_overflow_assertion (const MblMwMetaWearBoard *board, uint8_t enable) |
| Enables/disables stack overflow assertion. More... | |
| METAWEAR_API void | mbl_mw_debug_read_stack_overflow_state (const MblMwMetaWearBoard *board, void *context, MblMwFnData handler) |
| Reads the current stack state. More... | |
| METAWEAR_API void | mbl_mw_debug_read_schedule_queue_usage (const MblMwMetaWearBoard *board, void *context, MblMwFnData handler) |
| Reads the internal queues' current usage statistics; data is returned as a byte array. More... | |
| METAWEAR_API void | mbl_mw_debug_spoof_notification (const MblMwMetaWearBoard *board, const uint8_t *value, uint8_t length) |
| Creates a synthetic notification internally to the MetaWear system. More... | |
| METAWEAR_API void | mbl_mw_debug_send_command (const MblMwMetaWearBoard *board, const uint8_t *value, uint8_t length) |
| Sends a raw command directly to the MetaWear. More... | |
| METAWEAR_API MblMwDataSignal * | mbl_mw_debug_get_key_register_data_signal (const MblMwMetaWearBoard *board) |
| Retrieves a data signal representing the key register value. More... | |
| METAWEAR_API void | mbl_mw_debug_set_key_register (const MblMwMetaWearBoard *board, uint32_t value) |
| Sets the key register value. More... | |
Testing and debug functions, for advanced users only.
| METAWEAR_API void mbl_mw_debug_disconnect | ( | const MblMwMetaWearBoard * | board | ) |
Instructs the board to terminate the connection.
| board | Calling object |
| METAWEAR_API void mbl_mw_debug_enable_power_save | ( | const MblMwMetaWearBoard * | board | ) |
Places the board in a powered down state after the next reset.
When in power save mode, press the switch or plug in the USB charger to wake the board up.
| board | Calling object |
| METAWEAR_API MblMwDataSignal* mbl_mw_debug_get_key_register_data_signal | ( | const MblMwMetaWearBoard * | board | ) |
Retrieves a data signal representing the key register value.
This is a simple 4 byte scratch register.
| board | Board to receive data from |
| METAWEAR_API void mbl_mw_debug_jump_to_bootloader | ( | const MblMwMetaWearBoard * | board | ) |
Restarts the board in bootloader mode.
| board | Calling object |
| METAWEAR_API void mbl_mw_debug_read_schedule_queue_usage | ( | const MblMwMetaWearBoard * | board, |
| void * | context, | ||
| MblMwFnData | handler | ||
| ) |
Reads the internal queues' current usage statistics; data is returned as a byte array.
If feature is unspported, nullptr will be passed to the handler parameter
| board | Calling object |
| context | Pointer to additional data for the callback function |
| handler | Callback function for handling the received data |
| METAWEAR_API void mbl_mw_debug_read_stack_overflow_state | ( | const MblMwMetaWearBoard * | board, |
| void * | context, | ||
| MblMwFnData | handler | ||
| ) |
Reads the current stack state.
If feature is unspported, nullptr will be passed to the handler parameter
| board | Calling object |
| context | Pointer to additional data for the callback function |
| handler | Callback function for handling the received data |
| METAWEAR_API void mbl_mw_debug_reset | ( | const MblMwMetaWearBoard * | board | ) |
Issues a soft reset.
| board | Calling object |
| METAWEAR_API void mbl_mw_debug_reset_after_gc | ( | const MblMwMetaWearBoard * | board | ) |
Restarts the board after performing garbage collection.
| board | Calling object |
| METAWEAR_API void mbl_mw_debug_send_command | ( | const MblMwMetaWearBoard * | board, |
| const uint8_t * | value, | ||
| uint8_t | length | ||
| ) |
Sends a raw command directly to the MetaWear.
Useful for testing.
| board | Calling object |
| value | Value to send: [Module ID, Register ID, Optional Index, Data...] |
| lenght | Size of the value array |
| METAWEAR_API void mbl_mw_debug_set_key_register | ( | const MblMwMetaWearBoard * | board, |
| uint32_t | value | ||
| ) |
Sets the key register value.
This is a simple 4 byte scratch register.
| board | Board to receive data from |
| METAWEAR_API void mbl_mw_debug_set_stack_overflow_assertion | ( | const MblMwMetaWearBoard * | board, |
| uint8_t | enable | ||
| ) |
Enables/disables stack overflow assertion.
Function will do nothing if feature is unsupported.
| board | Calling object |
| enable | 0 to disable, non-zero value to enable |
| METAWEAR_API void mbl_mw_debug_spoof_notification | ( | const MblMwMetaWearBoard * | board, |
| const uint8_t * | value, | ||
| uint8_t | length | ||
| ) |
Creates a synthetic notification internally to the MetaWear system.
Useful for testing.
| board | Calling object |
| value | Value to spoof: [Module ID, Register ID, Notifcation En, Optional Index, Data...] |
| lenght | Size of the value array |