Mercurial > ~darius > hgwebdir.cgi > avr
diff 1wire-config.h @ 41:5898fba6593c
Add temperature control.
- Split out console stuff to cons.[ch]. Set up stdio so we can use printf etc.
- Use \r\n as the line terminator consistently.
- Add OWGetTemp to get temperatures from a device.
- Load/save settings in EEPROM, defaults loaded from flash.
Nearly feature complete except you can't edit ROM IDs without a programming tool :)
(To be fixed)
Needs more testing.
author | darius@inchoate.localdomain |
---|---|
date | Sun, 06 Jul 2008 22:19:53 +0930 |
parents | 0aa6bf4b98ae |
children |
line wrap: on
line diff
--- a/1wire-config.h Thu Nov 22 16:02:40 2007 +0000 +++ b/1wire-config.h Sun Jul 06 22:19:53 2008 +0930 @@ -76,20 +76,13 @@ _delay_us(48);_delay_us(48); _delay_us(48); } while (0) /* 480 usec */ #define OWDELAY_I do { _delay_us(48); _delay_us(22); } while (0) /* 70 usec */ -void uart_putsP(const char *addr); -void uart_puts(const char *addr); -void uart_puts_hex(uint8_t a); -void uart_puts_dec(uint8_t a, uint8_t l); -#if OW_DEBUG -void uart_putsP(const char *addr); -void uart_puts(const char *addr); -void uart_puts_hex(uint8_t a); -void uart_puts_dec(uint8_t a, uint8_t l); - -#define OWPUTS(x) uart_puts(x) -#define OWPUTSP(x) uart_putsP(x) +#ifdef OW_DEBUG +#define OWPUTS(x) puts_P(x) +#define OWPUTSP(x) puts_P(x) +#define OWPRINTFP(fmt, ...) printf_P(fmt, ## __VA_ARGS__) #else #define OWPUTS(x) #define OWPUTSP(x) +#define OWPRINTFP(fmt, ...) #endif