Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// in some header
- typedef ... hm2_spi_setup_function;
- typedef ... hm2_spi_force_write_function;
- typedef ... hm2_spi_prepare_tram_write_function;
- typedef ... hm2_spi_process_tram_read_function;
- struct hm2_spi_module {
- char name[16];
- hm2_spi_setup_function setup;
- hm2_spi_force_write_function force_write;
- hm2_spi_prepare_tram_write_function prepare_tram_write;
- hm2_spi_process_tram_read_function process_tram_read;
- };
- /// in some driver
- static struct hm2_spi_module bogoboard_submodule = {
- "bogoboard",
- bogoboard_setup,
- bogoboard_force_write,
- bogoboard_prepare_tram_write,
- bogoboard_process_tram_read
- };
- rtapi_app_main() {
- return hm2_register_spi_subdriver( &bogoboard_submodule );
- }
- /// in some hal file
- loadrt hm2_pic config="...., spi=bogoboard.bogoboard.cleverboard"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement