Rev 757 | Rev 800 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 757 | Rev 761 | ||
---|---|---|---|
Line 17... | Line 17... | ||
17 | * Free Software Foundation, Inc., * |
17 | * Free Software Foundation, Inc., * |
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
19 | ****************************************************************************/ |
19 | ****************************************************************************/ |
Line 20... | Line 20... | ||
20 | 20 | ||
21 | #include <avr/io.h> |
- | |
22 | 21 | #include <avr/io.h> |
|
23 | #include <util/delay.h> |
22 | #include <util/delay.h> |
24 | #include <avr/pgmspace.h> |
23 | #include <avr/pgmspace.h> |
25 | #include <string.h> |
24 | #include <string.h> |
26 | #include <stdlib.h> |
25 | #include <stdlib.h> |
Line 64... | Line 63... | ||
64 | 63 | ||
65 | // end sending |
64 | // end sending |
66 | MAX_CS_HIGH |
65 | MAX_CS_HIGH |
Line 67... | Line -... | ||
67 | } |
- | |
68 | 66 | } |
|
69 | 67 | ||
70 | /** |
68 | /** |
71 | * write a <character> to <address> of MAX7456 display memory |
69 | * write a <character> to <address> of MAX7456 display memory |
72 | */ |
70 | */ |
73 | void write_char(uint16_t address, char character) { |
71 | void write_char(uint16_t address, char character) { |
74 | spi_send_byte(0x05, (address & 0xFF00) >> 8); // DMAH |
72 | spi_send_byte(0x05, (address & 0xFF00) >> 8); // DMAH |
75 | spi_send_byte(0x06, (address & 0x00FF)); // DMAL |
73 | spi_send_byte(0x06, (address & 0x00FF)); // DMAL |
Line 76... | Line -... | ||
76 | spi_send_byte(0x07, character); // DMDI |
- | |
77 | } |
74 | spi_send_byte(0x07, character); // DMDI |
78 | 75 | } |
|
79 | 76 | ||
80 | /** |
77 | /** |
81 | * clear display memory |
78 | * clear display memory |
Line 93... | Line 90... | ||
93 | _delay_us(20); |
90 | _delay_us(20); |
94 | } |
91 | } |
Line 95... | Line 92... | ||
95 | 92 | ||
- | 93 | ||
96 | 94 | #if (ALLCHARSDEBUG|(WRITECHARS != -1)) |
|
97 | #if (ALLCHARSDEBUG|(WRITECHARS != -1)) |
95 | |
98 | /** |
96 | /** |
99 | * for testing write all chars to screen |
97 | * for testing write all chars to screen |
100 | */ |
98 | */ |