[X9D & sky9x] Refactoring

This commit is contained in:
bsongis
2013-01-16 20:53:43 +00:00
parent dccb20d127
commit b3e7e25849
36 changed files with 896 additions and 769 deletions
+2 -43
View File
@@ -34,26 +34,8 @@
#include "../open9x.h"
volatile uint8_t Buzzer_count ;
// Must NOT be in flash, PDC needs a RAM source.
// Amplitude reduced to 30% to allow for voice volume
uint16_t Sine_values[] =
{
2048,2085,2123,2160,2197,2233,2268,2303,2336,2369,
2400,2430,2458,2485,2510,2533,2554,2573,2590,2605,
2618,2629,2637,2643,2646,2648,2646,2643,2637,2629,
2618,2605,2590,2573,2554,2533,2510,2485,2458,2430,
2400,2369,2336,2303,2268,2233,2197,2160,2123,2085,
2048,2010,1972,1935,1898,1862,1826,1792,1758,1726,
1695,1665,1637,1610,1585,1562,1541,1522,1505,1490,
1477,1466,1458,1452,1448,1448,1448,1452,1458,1466,
1477,1490,1505,1522,1541,1562,1585,1610,1637,1665,
1695,1726,1758,1792,1826,1862,1898,1935,1972,2010
};
// Sound routines
void startSound()
void audioInit()
{
}
@@ -71,29 +53,6 @@ void setFrequency(uint32_t frequency)
}
}
// Start TIMER1 at 100000Hz, used for DACC trigger
void start_timer1()
{
}
// Configure DAC0 (or DAC1 for REVA)
// Not sure why PB14 has not be allocated to the DAC, although it is an EXTRA function
// So maybe it is automatically done
void initDac()
{
}
void end_sound()
{
}
// Set up for volume control (TWI0)
// Need PA3 and PA4 set to peripheral A
void init_twi()
{
}
void setVolume( unsigned char volume )
void audioEnd()
{
}
-4
View File
@@ -91,10 +91,6 @@ void interrupt5ms()
// AUDIO_HEARTBEAT();
if ( ++pre_scale >= 2 ) {
/* if ( Buzzer_count ) {
if ( --Buzzer_count == 0 )
buzzer_off() ;
} */
pre_scale = 0 ;
per10ms();
}
+13 -11
View File
@@ -87,7 +87,7 @@ extern volatile uint32_t Card_initialized;
#define SD_GET_BLOCKNR() (0)
#define SD_GET_SPEED() (0)
void soft_power_off();
void pwrOff();
#define strcpy_P strcpy
#define strcat_P strcat
@@ -103,7 +103,7 @@ extern uint16_t sessionTimer;
#define BOOTLOADER_REQUEST() (0/*usbPlugged()*/)
#define SLAVE_MODE() (0/*check_soft_power() == e_power_trainer*/)
#define SLAVE_MODE() (0/*pwrCheck() == e_power_trainer*/)
#if !defined(SIMU)
#define wdt_disable()
@@ -111,7 +111,7 @@ extern uint16_t sessionTimer;
#define wdt_reset()
#endif
#define check_soft_power() e_power_on
#define pwrCheck() e_power_on
#define setBacklight(xx)
#define __BACKLIGHT_ON
@@ -127,25 +127,27 @@ void eeWriteBlockCmp(const void *pointer_ram, uint16_t pointer_eeprom, size_t si
#define NUM_VOL_LEVELS 24
void startSound( void ) ;
void audioInit( void ) ;
void audioEnd( void ) ;
void setFrequency( uint32_t frequency );
uint32_t getFrequency();
void start_timer1( void );
void initDac( void ) ;
void end_sound( void ) ;
#define dacFill(...)
extern uint16_t *nextAudioData;
extern uint16_t nextAudioSize;
inline void toneStart()
inline void dacStart()
{
}
inline void toneStop()
inline void dacStop()
{
}
extern void init_twi( void ) ;
extern void setVolume( register uint8_t volume ) ;
inline void setVolume( register uint8_t volume )
{
}
#endif