diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-06-07 23:46:48 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-06-07 23:46:48 +0200 |
commit | 0d3c52e49dc34344f335fd6d7b214592723cbc93 (patch) | |
tree | 36c8b974556a5ee3c955549131ac3858208d373b /shared/io.h | |
parent | c88c7c7c6e6c687c3d8170cb07a467aa3c4d7f48 (diff) |
implemented obstacle detection
Diffstat (limited to 'shared/io.h')
-rw-r--r-- | shared/io.h | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/shared/io.h b/shared/io.h deleted file mode 100644 index 584ad1e..0000000 --- a/shared/io.h +++ /dev/null @@ -1,59 +0,0 @@ -#pragma once - -#include <stdio.h> - -#include "bool.h" - -#pragma pack(push, 1) - -/** momentary button input struct */ -typedef struct { - bool pressed; -} w2_s_i_push; - -/** qtr contrast sensor input struct */ -typedef struct { - uint16_t range; -} w2_s_i_contrast; - -/** distance sensor input struct */ -typedef struct { - uint16_t detection; -} w2_s_i_distance; - -/** battery input struct */ -typedef struct { - uint16_t charge_level; -} w2_s_i_battery; - -/** motor output struct */ -typedef struct { - int16_t speed; -} w2_s_o_motor; - -/** underside led output struct */ -typedef struct { - bool on; -} w2_s_o_led; - -/** lcd output struct */ -typedef struct { - char text[16]; -} w2_s_o_display; - -/** struct containing all i/o */ -typedef struct { - w2_s_i_push button[5]; - w2_s_i_contrast qtr[5]; - w2_s_i_distance front_distance; - w2_s_i_distance side_distance; - w2_s_i_battery battery; - - w2_s_o_motor motor_left; - w2_s_o_motor motor_right; - w2_s_o_led led_red; - w2_s_o_led led_green; - w2_s_o_display lcd; -} w2_s_io_all; - -#pragma pack(pop) |