Changeset cbc34d1 in avrstuff for libs


Ignore:
Timestamp:
Dec 11, 2011, 10:36:56 PM (12 years ago)
Author:
Adrien Destugues <pulkomandy@…>
Branches:
main
Children:
1fabcce
Parents:
03d5724
Message:

Some fixes and improvements to akusb and lib amiga_keyboard to try not losing that much keypresses.
It's not perfect yet, but it's better.

git-svn-id: svn://pulkomandy.tk/avrstuff@49 c6672c3c-f6b6-47f9-9001-1fd6b12fecbe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libs/amiga_keyboard/amiga_keyboard.c

    r03d5724 rcbc34d1  
    2525
    2626// Notify the keyboard we got the last char right
    27 inline void acknowledge_char()
     27static inline void acknowledge_char()
    2828{
    2929        // We have to pull down the "DATA" line
     
    4747ISR(INT1_vect)
    4848{
     49        static char tmp_kdata;
    4950        //make sure clock line is low, if not ignore this transition
    5051        if(AK_PORT & (1<<AK_CLK)){
     
    5657                started = 1;
    5758                bit_count = 0;
    58                 kbd_data = 0;
     59                tmp_kdata = 0;
    5960        }
    6061
     
    6263                //put a 1 in the right place of kdb_data if PC2 is high, leave
    6364                //a 0 otherwise
    64                 if(!(AK_PORT & (1<<AK_DATA))) kbd_data |= (128>>bit_count);
     65                if(!(AK_PORT & (1<<AK_DATA))) tmp_kdata |= (128>>bit_count);
    6566                bit_count++;
    6667        }
     
    9293                        }
    9394                }*/
     95                kbd_data = tmp_kdata;
    9496                char_waiting=1;
    9597        }
Note: See TracChangeset for help on using the changeset viewer.