Subversion Repositories HomeAutomation

Rev

Rev 223 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 223 Rev 267
Line 1... Line 1...
1
#include <inttypes.h>
1
#include <inttypes.h>
2
#include <avr/interrupt.h>
2
#include <avr/interrupt.h>
-
 
3
#include <stdio.h>
3
#include <bios.h>
4
#include <bios.h>
4
 
5
 
5
static int app_putchar(char c, FILE *stream);
6
static int app_putchar(char c, FILE *stream);
6
static int app_getchar(FILE *stream);
7
static int app_getchar(FILE *stream);
7
 
8
 
8
static FILE mystdio = FDEV_SETUP_STREAM(app_putchar, app_getchar,
9
static FILE mystdio = FDEV_SETUP_STREAM(app_putchar, app_getchar,
9
                                         _FDEV_SETUP_RW);
10
                                         _FDEV_SETUP_RW);
10
 
11
 
11
static int app_putchar(char c, FILE *stream) {
12
static int app_putchar(char c, FILE *stream) {
12
    bios->can_send(c);
13
    bios->debug_putchar(c);
13
    return 0;
14
    return 0;
14
}
15
}
15
   
16
   
16
static int app_getchar(FILE *stream) {
17
static int app_getchar(FILE *stream) {
17
    return bios->can_receive();
18
    return bios->debug_getchar();
18
}
19
}
19
 
20
 
20
int main(void)
21
int main(void)
21
{
22
{
22
    long time;
23
    long time;