aversive_10-03-12/projects/example1/main.c File Reference

#include <stdio.h>
#include <string.h>
#include <aversive/wait.h>
#include <aversive/list.h>
#include <uart.h>

Go to the source code of this file.

Defines

#define SCANCODE_MAX_SIZE   8
#define SCANCODE_BREAK   1
#define SCANCODE_EXTENDED   2
#define SCANCODE_HAS_NO_BREAK   4
#define SCANCODE_EXTENDED_LIST   "\x11\x14\x4A\x5A\x69\x6B\x6C\x70\x71\x72\x74\x75\x7A\x7C\x7D"
#define SCANCODE_EXTENDED_LIST_SIZE   15
#define SCANCODE_EXTENDED_LIST_OFFSET   0x85
#define SCANCODE_VAL_PAUSE   "\xE1\x14\x77\xE1\xF0\x14\xF0\x77"
#define SCANCODE_VAL_PAUSE_SIZE   8
#define SCANCODE_VAL_PAUSE_OFFSET   0
#define SCANCODE_VAL_PRTSCR_BREAK   "\xE0\xF0\x12\xE0\xF0\x7C"
#define SCANCODE_VAL_PRTSCR_BREAK_SIZE   6
#define SCANCODE_VAL_PRTSCR_BREAK_OFFSET   1
#define SCANCODE_VAL_CTRL_PAUSE   "\xE0\x7E\xE0\xF0\x7E"
#define SCANCODE_VAL_CTRL_PAUSE_SIZE   5
#define SCANCODE_VAL_CTRL_PAUSE_OFFSET   2
#define SCANCODE_VAL_SHIFT_SLASH   "\xE0\xF0\x12\xE0\x4A"
#define SCANCODE_VAL_SHIFT_SLASH_SIZE   5
#define SCANCODE_VAL_SHIFT_SLASH_OFFSET   3
#define SCANCODE_VAL_SHIFT_SLASH_BREAK   "\xE0\xF0\x4A\xE0\x12"
#define SCANCODE_VAL_SHIFT_SLASH_BREAK_SIZE   5
#define SCANCODE_VAL_SHIFT_SLASH_BREAK_OFFSET   3
#define SCANCODE_VAL_PRTSCR   "\xE0\x12\xE0\x7C"
#define SCANCODE_VAL_PRTSCR_SIZE   4
#define SCANCODE_VAL_PRTSCR_OFFSET   1

Functions

 LIST_TYPEDEF (fifo_t, char, 32)
int8_t get_scancode (struct scancode *s)
void print_scancode (struct scancode *s)
int main (void)

Variables

volatile fifo_t my_fifo
char tab []
char * scancode_extended_list = SCANCODE_EXTENDED_LIST


Define Documentation

#define SCANCODE_BREAK   1

Definition at line 14 of file main.c.

Referenced by get_scancode(), and print_scancode().

#define SCANCODE_EXTENDED   2

Definition at line 15 of file main.c.

Referenced by get_scancode(), and print_scancode().

#define SCANCODE_EXTENDED_LIST   "\x11\x14\x4A\x5A\x69\x6B\x6C\x70\x71\x72\x74\x75\x7A\x7C\x7D"

#define SCANCODE_EXTENDED_LIST_OFFSET   0x85

Referenced by get_scancode().

#define SCANCODE_EXTENDED_LIST_SIZE   15

Referenced by get_scancode().

#define SCANCODE_HAS_NO_BREAK   4

Definition at line 16 of file main.c.

Referenced by get_scancode(), and print_scancode().

#define SCANCODE_MAX_SIZE   8

Definition at line 12 of file main.c.

Referenced by get_scancode().

#define SCANCODE_VAL_CTRL_PAUSE   "\xE0\x7E\xE0\xF0\x7E"

Referenced by get_scancode().

#define SCANCODE_VAL_CTRL_PAUSE_OFFSET   2

Referenced by get_scancode().

#define SCANCODE_VAL_CTRL_PAUSE_SIZE   5

Referenced by get_scancode().

#define SCANCODE_VAL_PAUSE   "\xE1\x14\x77\xE1\xF0\x14\xF0\x77"

Referenced by get_scancode().

#define SCANCODE_VAL_PAUSE_OFFSET   0

Referenced by get_scancode().

#define SCANCODE_VAL_PAUSE_SIZE   8

Referenced by get_scancode().

#define SCANCODE_VAL_PRTSCR   "\xE0\x12\xE0\x7C"

Referenced by get_scancode().

#define SCANCODE_VAL_PRTSCR_BREAK   "\xE0\xF0\x12\xE0\xF0\x7C"

Referenced by get_scancode().

#define SCANCODE_VAL_PRTSCR_BREAK_OFFSET   1

Referenced by get_scancode().

#define SCANCODE_VAL_PRTSCR_BREAK_SIZE   6

Referenced by get_scancode().

#define SCANCODE_VAL_PRTSCR_OFFSET   1

Referenced by get_scancode().

#define SCANCODE_VAL_PRTSCR_SIZE   4

Referenced by get_scancode().

#define SCANCODE_VAL_SHIFT_SLASH   "\xE0\xF0\x12\xE0\x4A"

Referenced by get_scancode().

#define SCANCODE_VAL_SHIFT_SLASH_BREAK   "\xE0\xF0\x4A\xE0\x12"

Referenced by get_scancode().

#define SCANCODE_VAL_SHIFT_SLASH_BREAK_OFFSET   3

Referenced by get_scancode().

#define SCANCODE_VAL_SHIFT_SLASH_BREAK_SIZE   5

Referenced by get_scancode().

#define SCANCODE_VAL_SHIFT_SLASH_OFFSET   3

Referenced by get_scancode().

#define SCANCODE_VAL_SHIFT_SLASH_SIZE   5

Referenced by get_scancode().


Function Documentation

int8_t get_scancode ( struct scancode *  s  ) 

LIST_TYPEDEF ( fifo_t  ,
char  ,
32   
)

int main ( void   ) 

Definition at line 363 of file main.c.

References get_scancode(), LIST_INIT, LIST_PULL_START, LIST_PUSH_END, my_fifo, and print_scancode().

void print_scancode ( struct scancode *  s  ) 

Definition at line 347 of file main.c.

References i, SCANCODE_BREAK, SCANCODE_EXTENDED, SCANCODE_HAS_NO_BREAK, and tab.

Referenced by main().


Variable Documentation

volatile fifo_t my_fifo

Definition at line 10 of file main.c.

Referenced by get_scancode(), and main().

char* scancode_extended_list = SCANCODE_EXTENDED_LIST

Definition at line 235 of file main.c.

Referenced by get_scancode().

char tab[]

Definition at line 25 of file main.c.

Referenced by print_scancode().


Generated on Fri Mar 12 06:32:07 2010 for AVR by  doxygen 1.5.6