Expansion module support library. More...
#include <furi_hal_serial_types.h>
Go to the source code of this file.
Macros | |
#define | RECORD_EXPANSION "expansion" |
FURI record key to access the expansion object. | |
Typedefs | |
typedef struct Expansion | Expansion |
Expansion opaque type declaration. | |
Functions | |
void | expansion_enable (Expansion *instance) |
Enable support for expansion modules. | |
void | expansion_disable (Expansion *instance) |
Disable support for expansion modules. | |
void | expansion_set_listen_serial (Expansion *instance, FuriHalSerialId serial_id) |
Enable support for expansion modules on designated serial port. | |
Expansion module support library.
void expansion_disable | ( | Expansion * | instance | ) |
Disable support for expansion modules.
Calling this function will cease all communications with the expansion module (if any), release the serial handle and reset the respective pins to the default state.
[in,out] | instance | pointer to the Expansion instance. |
void expansion_enable | ( | Expansion * | instance | ) |
Enable support for expansion modules.
Calling this function will load user settings and enable expansion module support on the serial port specified in said settings.
If expansion module support was disabled in settings, this function does nothing.
[in,out] | instance | pointer to the Expansion instance. |
void expansion_set_listen_serial | ( | Expansion * | instance, |
FuriHalSerialId | serial_id ) |
Enable support for expansion modules on designated serial port.
Only one serial port can be used to communicate with an expansion module at a time.
Calling this function when expansion module support is already enabled will first disable the previous setting, then enable the current one.
[in,out] | instance | pointer to the Expansion instance. |
[in] | serial_id | numerical identifier of the serial. |