Changeset 38f2eef in avrstuff
- Timestamp:
- Jul 31, 2010, 9:36:19 AM (14 years ago)
- Branches:
- main
- Children:
- bb69525
- Parents:
- 08d5388
- Location:
- libs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
libs/amiga_keyboard/amiga_keyboard.c
r08d5388 r38f2eef 10 10 #include <util/delay.h> 11 11 12 #include "amiga_keyboard.h" 12 13 #include "keymap.h" 13 14 … … 107 108 108 109 109 uint8_t ak_ read_scancode(){110 uint8_t ak_wait_scancode(){ 110 111 while(!char_waiting); 112 return ak_read_scancode(); 113 } 111 114 112 while (AK_PORT & (1<<AK_CLK) == 0); 115 116 uint8_t ak_read_scancode() { 117 while ((AK_PORT & (1<<AK_CLK)) == 0); 113 118 _delay_us(30); 114 119 acknowledge_char(); -
libs/amiga_keyboard/amiga_keyboard.h
r08d5388 r38f2eef 5 5 #include <inttypes.h> 6 6 7 extern volatile uint8_t char_waiting; 7 8 8 9 void ak_init_keyboard(); 9 10 // Call this to set up the I/O pins 11 uint8_t ak_wait_scancode(); 12 // Wait for a char to come from the keyboard 10 13 uint8_t ak_read_scancode(); 11 // Wait for a char to come from the keyboard14 // Get char from keyboard. Only call this if char_waiting is set ! 12 15 char ak_scancode_to_ascii(uint8_t); 13 16 // Convert a keycode to a printable ASCII char -
libs/usart/usart.h
r08d5388 r38f2eef 3 3 * Distributed under the terms of the MIT Licence */ 4 4 5 #include <stdint.h> 6 5 7 void USARTInit(uint16_t ubrr_value); 6 8 void USARTWriteChar(char data);
Note:
See TracChangeset
for help on using the changeset viewer.