1 | #include "Parametrieren.h"
|
2 | #include "inits_LCD.h"
|
3 |
|
4 | uint8_t location_AES __attribute__((section(".eeprom"))) = 0x14;
|
5 |
|
6 | void AES_programmieren (void)
|
7 | {
|
8 | uint8_t Tasternummer = 0x00;
|
9 | int i;
|
10 |
|
11 | display_clear();
|
12 |
|
13 | move_cursor(0,1);
|
14 | send_string("AES Program");
|
15 | move_cursor(0,2);
|
16 | send_string("Start druecken");
|
17 |
|
18 | while (Tasternummer != 5)
|
19 | {
|
20 |
|
21 | if(Tasternummer == 6)
|
22 | {
|
23 | move_cursor(0,1);
|
24 | send_string("TRANSMISSION ");
|
25 | move_cursor(6,2);
|
26 | send_string(" START ");
|
27 |
|
28 | _delay_ms(1000);
|
29 |
|
30 |
|
31 | // Transmissionpaket + Programmierung - anschließend speichern in EEPROM
|
32 |
|
33 |
|
34 | for(i=0; i<16; i++) //Code ins EEPROM speichern
|
35 | {
|
36 | eeprom_busy_wait();
|
37 | eeprom_write_byte(&location_AES, 3);
|
38 | location_AES++;
|
39 | }
|
40 |
|
41 | display_clear();
|
42 | move_cursor(0,1);
|
43 | send_string("TRANSMISSION ");
|
44 | move_cursor(6,2);
|
45 | send_string(" COMPLETED ");
|
46 |
|
47 | return;
|
48 |
|
49 |
|
50 |
|
51 | }
|
52 |
|
53 | _delay_ms(100);
|
54 | Tasternummer = taster_abfragen();
|
55 |
|
56 |
|
57 | }
|
58 |
|
59 | move_cursor(0,1);
|
60 | send_string("Programmierung ");
|
61 |
|
62 | move_cursor(0,2);
|
63 | send_string("fehlgeschlagen ");
|
64 |
|
65 | _delay_ms(1000);
|
66 | }
|