diff options
author | Nicholas Tay <nick@windblume.net> | 2022-05-11 19:22:08 +1000 |
---|---|---|
committer | Nicholas Tay <nick@windblume.net> | 2022-05-11 19:22:08 +1000 |
commit | 2fee408d6fe0964e245dc0bae90027baa13b159a (patch) | |
tree | 8ff7cd648f2e9331b6e86ac3dfeb7c4e07df8f99 /board/mxblue | |
parent | 6a1e6a7d6b6a3d987f2fccb3c06f4f5da071f504 (diff) | |
download | clak-2fee408d6fe0964e245dc0bae90027baa13b159a.tar.gz clak-2fee408d6fe0964e245dc0bae90027baa13b159a.tar.bz2 clak-2fee408d6fe0964e245dc0bae90027baa13b159a.zip |
Improve plugin loading architecture
This should be better, maybe the variable names could be better though.
Init is more extensible, we take in a 'board_data' struct on the plugin
end that has everything it needs (mainly function pointers for now).
Then, a 'board' struct is given back to the main Clak runtime, with
everything it needs to know (again, mainly function pointers).
It is a bit weird that the board is not stored with Clak but as a
pointer to the dynamically loaded bit, but not sure.
Diffstat (limited to 'board/mxblue')
-rw-r--r-- | board/mxblue/board.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/board/mxblue/board.c b/board/mxblue/board.c index 14277db..fb0456d 100644 --- a/board/mxblue/board.c +++ b/board/mxblue/board.c @@ -1,12 +1,4 @@ #include "sound.h" - -#include "../board.c" - -void board_on_down(void) -{ - sound_play(mxblue_board_down_wav); -} - -void board_on_up(void) -{ -}
\ No newline at end of file +#define BOARD_NAME "Cherry MX Blue" +#define BOARD_DOWN_WAV mxblue_board_down_wav +#include "../simple_board.h"
\ No newline at end of file |