sixkeyboard.c 992 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #include "sixkeyboard.h"
  2. __attribute__ ((weak))
  3. void matrix_init_user(void) {
  4. // leave this function blank - it can be defined in a keymap file
  5. };
  6. __attribute__ ((weak))
  7. void matrix_scan_user(void) {
  8. // leave this function blank - it can be defined in a keymap file
  9. };
  10. __attribute__ ((weak))
  11. void led_set_user(uint8_t usb_led) {
  12. // leave this function blank - it can be defined in a keymap file
  13. };
  14. void matrix_init_kb(void) {
  15. // put your keyboard start-up code here
  16. // runs once when the firmware starts up
  17. DDRC |= (1<<4);
  18. PORTC &= ~(1<<4);
  19. DDRC |= (1<<6);
  20. PORTC &= ~(1<<6);
  21. DDRB |= (1<<6);
  22. PORTB &= ~(1<<6);
  23. DDRB |= (1<<4);
  24. PORTB &= ~(1<<4);
  25. DDRD |= (1<<5);
  26. PORTD &= ~(1<<5);
  27. DDRD |= (1<<2);
  28. PORTD &= ~(1<<2);
  29. DDRD |= (1<<3);
  30. PORTD &= ~(1<<3);
  31. matrix_init_user();
  32. };
  33. void matrix_scan_kb(void) {
  34. // put your looping keyboard code here
  35. // runs every cycle (a lot)
  36. matrix_scan_user();
  37. };