1
/* GCC bug #31644: [avr] can't find a register in class 'BASE_POINTER_REGS'
3
This is compile-time bug.
4
$Id: bug-31644.c,v 1.1.2.2 2008/03/08 22:37:57 dmix Exp $ */
7
int main () { return 0; }
10
#include <avr/eeprom.h>
12
uint8_t pwm_tab_1[126];
14
static uint16_t ee_chan_1_min EEMEM = 140,
15
ee_chan_1_cent EEMEM = 188,
16
ee_chan_1_max EEMEM = 240,
17
ee_chan_1_forw_min EEMEM = 20,
18
ee_chan_1_forw_max EEMEM = 90,
19
ee_chan_1_back_max EEMEM = 80;
21
void fill_pwm_table(int8_t chan_num,
34
pwm[4] = forward_high;
36
pwm[6] = reverse_high;
39
void build_pwm_table (void)
48
center_1 = eeprom_read_word (&ee_chan_1_cent);
50
forward_max_1 = eeprom_read_word (&ee_chan_1_max);
51
reverse_min_1 = eeprom_read_word (&ee_chan_1_min);
52
forward_high_1 = eeprom_read_word (&ee_chan_1_forw_max);
53
forward_low_1 = eeprom_read_word (&ee_chan_1_forw_min);
54
reverse_high_1 = eeprom_read_word (&ee_chan_1_back_max);
56
fill_pwm_table (1, pwm_tab_1, forward_max_1, center_1,
58
forward_high_1, forward_low_1, reverse_high_1);
60
fill_pwm_table (1, pwm_tab_1, forward_max_1, center_1,
62
forward_high_1, forward_low_1, reverse_high_1);