[ACT] Navigation & Menus
This commit is contained in:
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* Authors (alphabetical order)
|
||||
* - Andre Bernet <bernet.andre@gmail.com>
|
||||
* - Bertrand Songis <bsongis@gmail.com>
|
||||
* - Bryan J. Rentoul (Gruvin) <gruvin@gmail.com>
|
||||
* - Cameron Weeks <th9xer@gmail.com>
|
||||
* - Erez Raviv
|
||||
* - Jean-Pierre Parisy
|
||||
* - Karl Szmutny <shadow@privy.de>
|
||||
* - Michael Blandford
|
||||
* - Michal Hlavinka
|
||||
* - Pat Mackenzie
|
||||
* - Philip Moss
|
||||
* - Rob Thomson
|
||||
* - Romolo Manfredini <romolo.manfredini@gmail.com>
|
||||
* - Thomas Husterer
|
||||
*
|
||||
* open9x is based on code named
|
||||
* gruvin9x by Bryan J. Rentoul: http://code.google.com/p/gruvin9x/,
|
||||
* er9x by Erez Raviv: http://code.google.com/p/er9x/,
|
||||
* and the original (and ongoing) project by
|
||||
* Thomas Husterer, th9x: http://code.google.com/p/th9x/
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef audio_driver_h
|
||||
#define audio_driver_h
|
||||
|
||||
#define NUM_VOL_LEVELS 24
|
||||
|
||||
void startSound( void ) ;
|
||||
void setFrequency( uint32_t frequency );
|
||||
uint32_t getFrequency();
|
||||
void start_timer1( void );
|
||||
void initDac( void ) ;
|
||||
void end_sound( void ) ;
|
||||
|
||||
extern uint16_t *nextAudioData;
|
||||
extern uint16_t nextAudioSize;
|
||||
|
||||
inline void toneStart()
|
||||
{
|
||||
}
|
||||
|
||||
inline void toneStop()
|
||||
{
|
||||
}
|
||||
|
||||
extern void init_twi( void ) ;
|
||||
extern void setVolume( register uint8_t volume ) ;
|
||||
|
||||
#endif
|
||||
+23
-1
@@ -48,7 +48,6 @@
|
||||
#include "hal.h"
|
||||
#include "aspi.h"
|
||||
#include "i2c_ee.h"
|
||||
#include "audio_driver.h"
|
||||
|
||||
#define PERI1_FREQUENCY 30000000
|
||||
#define PERI2_FREQUENCY 60000000
|
||||
@@ -139,4 +138,27 @@ void uartSendChar(uint8_t c);
|
||||
void delaysInit(void);
|
||||
void delay_01us(uint16_t nb);
|
||||
|
||||
#define NUM_VOL_LEVELS 24
|
||||
|
||||
void startSound( void ) ;
|
||||
void setFrequency( uint32_t frequency );
|
||||
uint32_t getFrequency();
|
||||
void start_timer1( void );
|
||||
void initDac( void ) ;
|
||||
void end_sound( void ) ;
|
||||
|
||||
extern uint16_t *nextAudioData;
|
||||
extern uint16_t nextAudioSize;
|
||||
|
||||
inline void toneStart()
|
||||
{
|
||||
}
|
||||
|
||||
inline void toneStop()
|
||||
{
|
||||
}
|
||||
|
||||
extern void init_twi( void ) ;
|
||||
extern void setVolume( register uint8_t volume ) ;
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ void delaysInit(void)
|
||||
|
||||
void delay_01us(uint16_t nb)
|
||||
{
|
||||
TIM13->EGR = 1;
|
||||
TIM13->EGR = 1;
|
||||
TIM13->CNT = 0;
|
||||
TIM13->CR1 = 0x03;
|
||||
while(TIM13->CNT < nb);
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
#define RCC_AHB1Periph_GPIOBUTTON (RCC_AHB1Periph_GPIOA|RCC_AHB1Periph_GPIOB|RCC_AHB1Periph_GPIOC|RCC_AHB1Periph_GPIOD|RCC_AHB1Periph_GPIOE)
|
||||
|
||||
// Keys
|
||||
#define GPIO_BUTTON_ENTER GPIOE->IDR
|
||||
#define GPIO_BUTTON_PLUS GPIOE->IDR
|
||||
#define GPIO_BUTTON_MINUS GPIOE->IDR
|
||||
#define GPIO_BUTTON_MENU GPIOD->IDR
|
||||
#define GPIO_BUTTON_EXIT GPIOD->IDR
|
||||
#define GPIO_BUTTON_PAGE GPIOD->IDR
|
||||
#define PIN_BUTTON_PLUS GPIO_Pin_10 //SW3 PE.10
|
||||
#define PIN_BUTTON_MINUS GPIO_Pin_11 //SW1 PE.12
|
||||
#define PIN_BUTTON_ENTER GPIO_Pin_12 //SW2 PE.11
|
||||
|
||||
@@ -115,7 +115,7 @@ void readKeysAndTrims()
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t keyState(EnumKeys enuk)
|
||||
uint32_t switchState(EnumKeys enuk)
|
||||
{
|
||||
register uint32_t a = GPIOA->IDR;
|
||||
register uint32_t b = GPIOB->IDR;
|
||||
|
||||
@@ -28,12 +28,12 @@ const uint8_t lcdPalette[4] = { 0, 0x03, 0x06, 0x0F };
|
||||
|
||||
void lcdRefresh()
|
||||
{
|
||||
for (uint8_t y=0; y<DISPLAY_H; y++) {
|
||||
uint8_t *p = &displayBuf[(y>>3)*DISPLAY_W];
|
||||
for (uint8_t y=0; y<LCD_H; y++) {
|
||||
uint8_t *p = &displayBuf[(y>>3)*LCD_W];
|
||||
uint8_t mask = (1 << (y%8));
|
||||
Set_Address(0, y);
|
||||
AspiCmd(0xAF);
|
||||
for (uint8_t x=0; x<DISPLAY_W; x+=2) {
|
||||
for (uint8_t x=0; x<LCD_W; x+=2) {
|
||||
#if 0
|
||||
uint8_t data = (p[x] & mask ? 0x80 : 0) + (p[x+1] & mask ? 0x08 : 0) + (p[DISPLAY_PLAN_SIZE+x] & mask ? 0x40 : 0) + (p[DISPLAY_PLAN_SIZE+x+1] & mask ? 0x04 : 0);
|
||||
#elif 1
|
||||
|
||||
Reference in New Issue
Block a user