update
This commit is contained in:
32
main.c
32
main.c
@@ -18,43 +18,11 @@
|
||||
|
||||
#include <contr.h>
|
||||
|
||||
#define PINBADDR ((0x03) + 0x20)
|
||||
#define DDRBADDR ((0x04) + 0x20)
|
||||
#define PORTBADDR ((0x05) + 0x20)
|
||||
|
||||
#define PINCADDR ((0x06) + 0x20)
|
||||
#define DDRCADDR ((0x07) + 0x20)
|
||||
#define PORTCADDR ((0x08) + 0x20)
|
||||
|
||||
#define PINDADDR ((0x09) + 0x20)
|
||||
#define DDRDADDR ((0x0A) + 0x20)
|
||||
#define PORTDADDR ((0x0B) + 0x20)
|
||||
|
||||
//#define VOLBUT_DDRADDR DDRDADDR
|
||||
//#define VOLBUT_PORTADDR PORTDADDR
|
||||
//#define VOLBUT_PINDADDR PINDADDR
|
||||
//#define VOLBUT_OUTNUM PD2
|
||||
|
||||
#define VOLBUT_DDRADDR DDRCADDR
|
||||
#define VOLBUT_PORTADDR PORTCADDR
|
||||
#define VOLBUT_PINDADDR PINCADDR
|
||||
#define VOLBUT_OUTNUM PC0
|
||||
|
||||
int main(void) {
|
||||
i2c_init();
|
||||
disp_init();
|
||||
|
||||
adc_init();
|
||||
timer0_init();
|
||||
|
||||
button_init(&volume_button, VOLBUT_DDRADDR,
|
||||
VOLBUT_PORTADDR, VOLBUT_PINDADDR, VOLBUT_OUTNUM);
|
||||
button_setup(&volume_button);
|
||||
button_reset(&volume_button);
|
||||
|
||||
contr_init();
|
||||
contr_setup();
|
||||
sei();
|
||||
contr_main();
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user