Various projects using Raspberry Pi

raspitest.adb 799B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. with Ada.Text_IO;
  2. with bcm2835_h;
  3. with RaspiLcd;
  4. procedure raspitest is
  5. package IO renames Ada.Text_IO;
  6. package LCD renames RaspiLcd;
  7. begin
  8. if integer(bcm2835_h.bcm2835_init) = 0 then
  9. IO.Put_Line("Error while initializing BCM2835 library");
  10. else
  11. LCD.io_init;
  12. LCD.lcd_init;
  13. LCD.lcd_picture(xpos => 0, ypos => 0);
  14. bcm2835_h.bcm2835_delay(5000);
  15. LCD.lcd_clear;
  16. LCD.lcd_ascii57_string(xpos => 0, ypos => 0, data => "raspiFPGA 0.1");
  17. LCD.lcd_ascii57_string(xpos => 0, ypos => 1, data => "(c) raspiDEV 2013");
  18. -- close library
  19. if integer(bcm2835_h.bcm2835_close) = 0 then
  20. IO.Put_Line("Error while closing BCM2835 library");
  21. end if;
  22. end if;
  23. end raspitest;