consolidated build

This commit is contained in:
bigalex 2012-09-02 23:49:57 +02:00
parent fae72d2497
commit 08ff317b14
2 changed files with 17 additions and 20 deletions

View File

@ -1,4 +1,5 @@
#include <inttypes.h> #include <inttypes.h>
#include <avr/io.h>
#include "bughal.h" #include "bughal.h"
/* Hardware abstraction layer for Pentabug hardware */ /* Hardware abstraction layer for Pentabug hardware */
@ -24,12 +25,16 @@ void init_leds(void){
return; return;
}; };
void init_buzzr(int mode); void init_buzzr(int mode){
return;
};
void init_switch(); void init_switch(){
return;
};
static void init_motor(void) void init_motor(void)
{ {
/* vibration motor on B1, initially off: */ /* vibration motor on B1, initially off: */
DDRB |= (1 << PORTB1); DDRB |= (1 << PORTB1);

View File

@ -7,6 +7,7 @@
#include "main.h" #include "main.h"
#include "lib/synth.h" #include "lib/synth.h"
#include "lib/usart.h" #include "lib/usart.h"
#include "lib/bughal.h"
uint16_t sw_v = 0; uint16_t sw_v = 0;
@ -65,30 +66,21 @@ void __attribute__((noreturn))
main(void) main(void)
{ {
/* hardware initialisation: */ /* hardware initialisation: */
//init_leds(); init_leds();
USART0_Init(); //USART0_Init();
// init_motor(); // init_motor();
init_pwm(); //init_pwm();
init_sampletimer(); //init_sampletimer();
/* syntesizer initialisation */ /* syntesizer initialisation */
synth_init(); //synth_init();
/* here the show begins:*/ /* here the show begins:*/
sei(); //sei();
DDRC = 0b00000011;
PORTC = 0b00000001;
PORTC = 0b00000000;
for(;;) /* ever */ { for(;;) /* ever */ {
//do something //do something
synth_poll(); //synth_poll();
if (10 == 1){
uint16_t out = darkval;
USART0_put_uint16(out);
USART0_crlf();
//last_darkval=darkval;
};
//USART0_put_uint16(0xA09F); //USART0_put_uint16(0xA09F);
//USART0_crlf(); //USART0_crlf();
} }