Mercurial > ~darius > hgwebdir.cgi > avr
comparison testavr.c @ 9:7ed10c59ba06
Supply clock speed via the command line so 1wire-delay.h can use it.
author | darius |
---|---|
date | Mon, 12 Jul 2004 17:51:20 +0930 |
parents | a940431af6f5 |
children | eb1faf51968e |
comparison
equal
deleted
inserted
replaced
8:f9a085a0ba93 | 9:7ed10c59ba06 |
---|---|
1 /* | 1 /* |
2 * Test various AVR bits and pieces | |
3 * | |
4 * $Id$ | |
5 * | |
2 * Copyright (c) 2004 | 6 * Copyright (c) 2004 |
3 * Daniel O'Connor <darius@dons.net.au>. All rights reserved. | 7 * Daniel O'Connor <darius@dons.net.au>. All rights reserved. |
4 * | 8 * |
5 * Redistribution and use in source and binary forms, with or without | 9 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 10 * modification, are permitted provided that the following conditions |
33 #include <ctype.h> | 37 #include <ctype.h> |
34 | 38 |
35 #include "1wire.h" | 39 #include "1wire.h" |
36 | 40 |
37 #define UART_BAUD_SELECT(baudRate,xtalCpu) ((xtalCpu)/((baudRate)*16l)-1) | 41 #define UART_BAUD_SELECT(baudRate,xtalCpu) ((xtalCpu)/((baudRate)*16l)-1) |
38 #define XTAL_CPU 4000000 /* 4Mhz */ | |
39 #define UART_BAUD_RATE 19200 | 42 #define UART_BAUD_RATE 19200 |
40 | 43 |
41 void uart_putsP(const char *addr); | 44 void uart_putsP(const char *addr); |
42 void uart_puts(const char *addr); | 45 void uart_puts(const char *addr); |
43 int uart_putc(char c); | 46 int uart_putc(char c); |