summaryrefslogtreecommitdiffhomepage
path: root/digital/io/src/switch.h
diff options
context:
space:
mode:
authorJérémy Dufour2008-04-14 12:06:01 +0200
committerJérémy Dufour2008-04-14 12:06:01 +0200
commitd3c8bf5e81f46d66ff0badcbcbf20a3d828a30eb (patch)
treef66be160813127528352eeed837d223d6f520fe4 /digital/io/src/switch.h
parent7a7c0bb8b26353b2e754b4eaa79125aed33b0279 (diff)
* digital/io/src
* build - add dependency of fsm.h for main.c (for bootstrap) ; - ensure it is building for host target. * get samples FSM - remove unneeded fields in the getsamples structures ; - rename it to be more 'private' (to prevent declaring the same one) ; * top FSM - rewrite it ; - still missing some parts to implement. * general - manage color of the bot ; - initialize the switch module in the main_init ; - add position of the gutter.
Diffstat (limited to 'digital/io/src/switch.h')
-rw-r--r--digital/io/src/switch.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/digital/io/src/switch.h b/digital/io/src/switch.h
index 29e5a681..0f334776 100644
--- a/digital/io/src/switch.h
+++ b/digital/io/src/switch.h
@@ -31,6 +31,7 @@
#include "io.h" /* PORT/PIN, bit_is_set */
#include "modules/utils/utils.h" /* set_bit */
+#include "giboulee.h" /* team_color_e */
/**
* @defgroup SwitchConfiguration Configuration of the switch module.
@@ -74,7 +75,7 @@
* Initialize the switch module.
* This functions just put the pins in input direction and enable pull-ups.
*/
-inline void
+static inline void
switch_init (void)
{
/* By default, all pins are in input direction */
@@ -86,7 +87,7 @@ switch_init (void)
/**
* Get the current state of the select colors switch.
*/
-inline uint8_t
+static inline enum team_color_e
switch_get_color (void)
{
return bit_is_set (SWITCH_COLOR_PIN, SWITCH_COLOR_PIN_NUMBER);
@@ -95,7 +96,7 @@ switch_get_color (void)
/**
* Get the current state of the jack switch.
*/
-inline uint8_t
+static inline uint8_t
switch_get_jack (void)
{
return bit_is_set (SWITCH_JACK_PIN, SWITCH_JACK_PIN_NUMBER);