[X9D] First compilation OK! Next step: integrate the code for the drivers (only LCD done) from FrSky...
This commit is contained in:
+39
-42
@@ -35,15 +35,22 @@
|
||||
#define board_sky9x_h
|
||||
|
||||
#include <stdio.h>
|
||||
#include "sky9x/board.h"
|
||||
#include "sky9x/sound_driver.h"
|
||||
#include "sky9x/haptic_driver.h"
|
||||
#include "sky9x/debug.h"
|
||||
|
||||
#if defined(BLUETOOTH)
|
||||
#include "sky9x/bluetooth.h"
|
||||
#include "stm32f2xx_rcc.h"
|
||||
#include "stm32f2xx_gpio.h"
|
||||
#include "stm32f2xx.h"
|
||||
|
||||
#include "x9d/hal.h"
|
||||
#include "x9d/aspi.h"
|
||||
|
||||
#include "x9d/audio_driver.h"
|
||||
|
||||
// TODO elsewhere
|
||||
#if !defined(SIMU)
|
||||
#define SD_IS_HC() (1)
|
||||
#endif
|
||||
|
||||
|
||||
extern "C" {
|
||||
extern void init_SDcard();
|
||||
extern void sdInit();
|
||||
@@ -53,26 +60,9 @@ extern void sdInit();
|
||||
|
||||
void usbMassStorage();
|
||||
|
||||
#define PIN_ENABLE 0x001
|
||||
#define PIN_PERIPHERAL 0x000
|
||||
#define PIN_INPUT 0x002
|
||||
#define PIN_OUTPUT 0x000
|
||||
#define PIN_PULLUP 0x004
|
||||
#define PIN_NO_PULLUP 0x000
|
||||
#define PIN_PULLDOWN 0x008
|
||||
#define PIN_NO_PULLDOWN 0x000
|
||||
#define PIN_PERI_MASK_L 0x010
|
||||
#define PIN_PERI_MASK_H 0x020
|
||||
#define PIN_PER_A 0x000
|
||||
#define PIN_PER_B 0x010
|
||||
#define PIN_PER_C 0x020
|
||||
#define PIN_PER_D 0x030
|
||||
#define PIN_PORT_MASK 0x0C0
|
||||
#define PIN_PORTA 0x000
|
||||
#define PIN_PORTB 0x040
|
||||
#define PIN_PORTC 0x080
|
||||
#define PIN_LOW 0x000
|
||||
#define PIN_HIGH 0x100
|
||||
void setVolume( register uint8_t volume );
|
||||
#define JACK_PPM_OUT()
|
||||
#define JACK_PPM_IN()
|
||||
|
||||
void configure_pins( uint32_t pins, uint16_t config );
|
||||
uint16_t getCurrent();
|
||||
@@ -81,32 +71,39 @@ extern uint8_t temperature ; // Raw temp reading
|
||||
extern uint8_t maxTemperature ; // Raw temp reading
|
||||
uint8_t getTemperature();
|
||||
|
||||
extern int32_t Card_state;
|
||||
extern volatile uint32_t Card_initialized;
|
||||
#define SD_ST_DATA 9
|
||||
#define SD_ST_MOUNTED 10
|
||||
|
||||
#define SD_GET_SIZE_MB() (0)
|
||||
#define SD_GET_BLOCKNR() (0)
|
||||
#define SD_GET_SPEED() (0)
|
||||
|
||||
void soft_power_off();
|
||||
|
||||
#define strcpy_P strcpy
|
||||
#define strcat_P strcat
|
||||
|
||||
extern uint32_t read_keys();
|
||||
#define KEYS_PRESSED() (~read_keys())
|
||||
extern uint32_t readKeys();
|
||||
#define KEYS_PRESSED() (~readKeys())
|
||||
#define DBLKEYS_PRESSED_RGT_LFT(i) ((in & (0x20 + 0x40)) == (0x20 + 0x40))
|
||||
#define DBLKEYS_PRESSED_UP_DWN(i) ((in & (0x10 + 0x08)) == (0x10 + 0x08))
|
||||
#define DBLKEYS_PRESSED_RGT_UP(i) ((in & (0x20 + 0x10)) == (0x20 + 0x10))
|
||||
#define DBLKEYS_PRESSED_LFT_DWN(i) ((in & (0x40 + 0x08)) == (0x40 + 0x08))
|
||||
|
||||
#if !defined(REVA)
|
||||
extern uint16_t Current_analogue;
|
||||
extern uint16_t Current_max;
|
||||
extern uint32_t Current_accumulator;
|
||||
extern uint32_t Current_used;
|
||||
extern uint16_t sessionTimer;
|
||||
|
||||
#define BOOTLOADER_REQUEST() (0/*usbPlugged()*/)
|
||||
|
||||
#define SLAVE_MODE() (0/*check_soft_power() == e_power_trainer*/)
|
||||
|
||||
#if !defined(SIMU)
|
||||
#define wdt_disable()
|
||||
#define wdt_enable(x)
|
||||
#define wdt_reset()
|
||||
#endif
|
||||
|
||||
#if defined(REVC)
|
||||
#define BOOTLOADER_REQUEST() (usbPlugged())
|
||||
#else
|
||||
#define BOOTLOADER_REQUEST() (check_soft_power() == e_power_usb)
|
||||
#endif
|
||||
|
||||
#define SLAVE_MODE() (check_soft_power() == e_power_trainer)
|
||||
#define JACK_PPM_OUT() PIOC->PIO_PDR = PIO_PC22
|
||||
#define JACK_PPM_IN() PIOC->PIO_PER = PIO_PC22
|
||||
#define setBacklight(xx)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user