mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
dsm: add deinit function
This implements closing of the serial port which previously was not taken care of.
This commit is contained in:
parent
c0fcffae76
commit
97fe56a4e7
@ -305,6 +305,13 @@ dsm_init(const char *device)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
dsm_deinit()
|
||||
{
|
||||
close(dsm_fd);
|
||||
dsm_fd = -1;
|
||||
}
|
||||
|
||||
#ifdef GPIO_SPEKTRUM_PWR_EN
|
||||
/**
|
||||
* Handle DSM satellite receiver bind mode handler
|
||||
|
||||
@ -54,6 +54,7 @@ __BEGIN_DECLS
|
||||
#define DSM_BUFFER_SIZE (DSM_FRAME_SIZE + DSM_FRAME_SIZE / 2)
|
||||
|
||||
__EXPORT int dsm_init(const char *device);
|
||||
__EXPORT void dsm_deinit();
|
||||
__EXPORT void dsm_proto_init(void);
|
||||
__EXPORT int dsm_config(int dsm_fd);
|
||||
__EXPORT bool dsm_input(int dsm_fd, uint16_t *values, uint16_t *num_values, bool *dsm_11_bit, uint8_t *n_bytes,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user