Advertisement
Guest User

Untitled

a guest
Mar 15th, 2011
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. /// in some header
  2. typedef ... hm2_spi_setup_function;
  3. typedef ... hm2_spi_force_write_function;
  4. typedef ... hm2_spi_prepare_tram_write_function;
  5. typedef ... hm2_spi_process_tram_read_function;
  6. struct hm2_spi_module {
  7. char name[16];
  8. hm2_spi_setup_function setup;
  9. hm2_spi_force_write_function force_write;
  10. hm2_spi_prepare_tram_write_function prepare_tram_write;
  11. hm2_spi_process_tram_read_function process_tram_read;
  12. };
  13.  
  14. /// in some driver
  15. static struct hm2_spi_module bogoboard_submodule = {
  16. "bogoboard",
  17. bogoboard_setup,
  18. bogoboard_force_write,
  19. bogoboard_prepare_tram_write,
  20. bogoboard_process_tram_read
  21. };
  22.  
  23. rtapi_app_main() {
  24. return hm2_register_spi_subdriver( &bogoboard_submodule );
  25. }
  26.  
  27.  
  28. /// in some hal file
  29. loadrt hm2_pic config="...., spi=bogoboard.bogoboard.cleverboard"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement