diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-07-28 14:50:27 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-07-28 14:50:27 +0200 |
commit | 4e5eb9740b509e814e9c16aefe40a373d67bbc43 (patch) | |
tree | be657fe965c5216922bfd935f7edf2bdaa853443 /src/modules | |
parent | 18635c5f5fffd2648aea0fa81f36fa0e8f42afb8 (diff) | |
download | px4-firmware-4e5eb9740b509e814e9c16aefe40a373d67bbc43.tar.gz px4-firmware-4e5eb9740b509e814e9c16aefe40a373d67bbc43.tar.bz2 px4-firmware-4e5eb9740b509e814e9c16aefe40a373d67bbc43.zip |
Fixed led and reboot linker challenges in C++ environments
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/commander/state_machine_helper.c | 2 | ||||
-rw-r--r-- | src/modules/systemlib/systemlib.c | 4 | ||||
-rw-r--r-- | src/modules/systemlib/systemlib.h | 6 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/modules/commander/state_machine_helper.c b/src/modules/commander/state_machine_helper.c index ab728c7bb..c26478785 100644 --- a/src/modules/commander/state_machine_helper.c +++ b/src/modules/commander/state_machine_helper.c @@ -141,7 +141,7 @@ int do_state_update(int status_pub, struct vehicle_status_s *current_status, con current_status->flag_system_armed = false; mavlink_log_critical(mavlink_fd, "REBOOTING SYSTEM"); usleep(500000); - up_systemreset(); + systemreset(); /* SPECIAL CASE: NEVER RETURNS FROM THIS FUNCTION CALL */ } else { diff --git a/src/modules/systemlib/systemlib.c b/src/modules/systemlib/systemlib.c index 3283aad8a..a2b0d8cae 100644 --- a/src/modules/systemlib/systemlib.c +++ b/src/modules/systemlib/systemlib.c @@ -50,6 +50,10 @@ #include "systemlib.h" +__EXPORT extern void systemreset(void) { + up_systemreset(); +} + static void kill_task(FAR struct tcb_s *tcb, FAR void *arg); void killall() diff --git a/src/modules/systemlib/systemlib.h b/src/modules/systemlib/systemlib.h index 0194b5e52..77fdfe08a 100644 --- a/src/modules/systemlib/systemlib.h +++ b/src/modules/systemlib/systemlib.h @@ -42,11 +42,11 @@ #include <float.h> #include <stdint.h> -/** Reboots the board */ -extern void up_systemreset(void) noreturn_function; - __BEGIN_DECLS +/** Reboots the board */ +__EXPORT void systemreset(void) noreturn_function; + /** Sends SIGUSR1 to all processes */ __EXPORT void killall(void); |