mi mi / Mbed 2 deprecated wave_player_super_lite

Dependencies:   mbed DirectSPI FastPWM

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers sys.h Source File

sys.h

00001 #ifndef __SYS_H__
00002 #define __SYS_H__
00003 
00004 #include <stdint.h>
00005 #include <stdbool.h>
00006 #include "mbed.h"
00007 
00008 /* Selectable options depended on each situation.
00009  * If a functionality is needed, the value should be set to 1.
00010  * */
00011 
00012 /*----------------------
00013 -- Selectable Options
00014 ----------------------*/
00015 #define PWM16BIT                     1
00016 #define DATA_8BIT_SUPPORT            1
00017 #define HAVE_BUTTON_SW               1  // for 'Play','Pause','Power off'
00018 /* Enable either the type of blink or dimmer  */
00019 #define HAVE_LED_IND_PWM             1  // blink  LED during playing (750msec interval)
00020 #define HAVE_LED_IND_BLINK           0  // dimmer LED during playing
00021 /**********************/
00022 #define HAVE_LED_PAUSE_INDICATOR     1  // blink or dimmer during pausing
00023 #define HAVE_POWER_OFF_MODE          0  // under construction
00024 //-- Select FAT32/FAT16 or FAT16 only
00025 #define HAVE_FAT32                   1  // 0: FAT16 only, 1: FAT16 and FAT32 support
00026 //--- end option setting
00027 
00028 // TEST PORT
00029 #define TEST_PORT               PA_8    // D7
00030 // LED indicator
00031 #define IND_LED                 PB_10
00032 
00033 //-- debug purpose
00034 #define UART_INFO                   1
00035 #define DEBUG_WAV_PLAYER            0
00036 #define DEBUG_FAT_LIB               0
00037 #define DEBUG_SD_CARD               0
00038 #define TEST_PORT_ENABLE            1
00039 //
00040 #define HAVE_DIRECT_SPI             1
00041 
00042 typedef uint16_t word;
00043 typedef uint32_t dword;
00044 typedef uint8_t  byte;
00045 typedef int8_t   sbyte;
00046 typedef bool     sbit;
00047 
00048 #ifdef __CC_ARM
00049 #   define OPT_SPEED /* N/A */
00050 #else
00051 #   define OPT_SPEED __attribute__((optimize("O3")))
00052 #endif
00053 
00054 #endif /* __SYS_H__ */
00055 
00056