mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-19 16:33:20 +08:00
修复mico-sdk错误
This commit is contained in:
@@ -1,163 +1,163 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Mountain View Silicon Tech. Inc.
|
||||
// Copyright 2012, Mountain View Silicon Tech. Inc., Shanghai, China
|
||||
// All rights reserved.
|
||||
// Filename: breakpoint.h
|
||||
// ChangLog :
|
||||
// <09><EFBFBD>bp ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ2014-9-26 <20><>lujiangang
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef __BREAKPOINT_H__
|
||||
#define __BREAKPOINT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif//__cplusplus
|
||||
|
||||
// Disk<73><6B><EFBFBD><EFBFBD>
|
||||
#define UNKNOWN_DISK_TYPE -1
|
||||
#define NONE_DISK 0 // û<>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define USB_TYPE 1 // U<><55>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define SD_TYPE 2 // SD<53><44>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
#ifdef FUNC_BREAKPOINT_EN
|
||||
|
||||
#define BP_MAX_SIZE 115 //BP <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>(<28><><EFBFBD>ǵ<EFBFBD>NVM<56>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD><EFBFBD>)
|
||||
#define BP_SIGNATURE 0x5A
|
||||
#define BP_SET_ELEMENT(a, b) a = b
|
||||
#define BP_GET_ELEMENT(x) x
|
||||
#pragma pack(1)
|
||||
|
||||
|
||||
//**************************************************************************************************************
|
||||
// PLAYER <20><><EFBFBD>ضϵ<D8B6><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽṹ
|
||||
// ע<><D7A2>:: <20><EFBFBD>BP_PLAYER_INFO <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>sInitPlayerInfo <20><><EFBFBD><EFBFBD>
|
||||
//**************************************************************************************************************
|
||||
#if defined(FUNC_USB_EN) || defined(FUNC_CARD_EN) //PLAYER <20><><EFBFBD>ݴ洢<DDB4>ṹ
|
||||
|
||||
#define PLAYER_DISK_BP_CNT 3
|
||||
|
||||
typedef struct _BP_PLAY_DISK_INFO_
|
||||
{
|
||||
uint32_t FileAddr; // <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
uint16_t PlayTime; // <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
uint8_t CRC8; // <20>ļ<EFBFBD><C4BC><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD>
|
||||
#ifdef FUNC_FOLDER_PLAY_EN
|
||||
uint8_t FolderEnFlag; //<2F>ļ<EFBFBD><C4BC><EFBFBD>ʹ<EFBFBD>ܱ<EFBFBD>־
|
||||
#endif
|
||||
} BP_PLAY_DISK_INFO;
|
||||
|
||||
typedef struct _BP_PLAYER_INFO_ // <20><><EFBFBD><EFBFBD>ģʽ <20><><EFBFBD>ݴ洢<DDB4>ṹ
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
uint8_t PlayerVolume; // Volume:0--32
|
||||
// <20><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>ģʽ
|
||||
uint8_t PlayMode : 3; // Play mode
|
||||
// <20><>ǰEQ<45><51><EFBFBD><EFBFBD>
|
||||
uint8_t Eq : 4; // EQ
|
||||
// <20><><EFBFBD>ʿ<EFBFBD><CABF><EFBFBD>
|
||||
uint8_t LrcFlag : 1; // Lrc
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
BP_PLAY_DISK_INFO PlayDiskInfo[PLAYER_DISK_BP_CNT];
|
||||
} BP_PLAYER_INFO;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
//**************************************************************************************************************
|
||||
// Radio <20><><EFBFBD>ضϵ<D8B6><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽṹ
|
||||
// ע<><D7A2>:: <20><EFBFBD>BP_RADIO_INFO <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>sInitRadioInfo <20><><EFBFBD><EFBFBD>
|
||||
//**************************************************************************************************************
|
||||
#ifdef FUNC_RADIO_EN
|
||||
typedef struct _BP_RADIO_INFO_
|
||||
{
|
||||
uint8_t StationList[50]; // <20>ѱ<EFBFBD><D1B1><EFBFBD><EFBFBD><EFBFBD>̨<EFBFBD>б<EFBFBD>/*MAX_RADIO_CHANNEL_NUM*/
|
||||
uint8_t RadioVolume : 6; // FM<46><4D><EFBFBD><EFBFBD>
|
||||
uint8_t CurBandIdx : 2; // <20><>ǰFM<46><4D><EFBFBD>η<EFBFBD>Χ(00B<30><42>87.5~108MHz (US/Europe, China)<29><>01B<31><42>76~90MHz (Japan)<29><>10B<30><42>65.8~73MHz (Russia)<29><>11B<31><42>60~76MHz
|
||||
uint8_t StationCount; // <20>ѱ<EFBFBD><D1B1><EFBFBD><EFBFBD><EFBFBD>̨<EFBFBD><CCA8><EFBFBD><EFBFBD>
|
||||
uint16_t CurFreq; // <20><>ǰ<EFBFBD><C7B0>̨Ƶ<CCA8><C6B5>
|
||||
} BP_RADIO_INFO;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
//**************************************************************************************************************
|
||||
// SYSTEM <20><><EFBFBD>ضϵ<D8B6><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽṹ
|
||||
// ע<><D7A2>:: <20><EFBFBD>BP_SYS_INFO <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>sInitSysInfo <20><><EFBFBD><EFBFBD>
|
||||
//**************************************************************************************************************
|
||||
typedef struct _BP_SYS_INFO_
|
||||
{
|
||||
uint8_t VaildFlag; // Only when this field is equal to BP_SIGNATURE, this structure is valid.
|
||||
// <20><>ǰӦ<C7B0><D3A6>ģʽ
|
||||
uint8_t CurModuleId; // system function mode.
|
||||
// <20><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>ģʽ<C4A3><CABD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>صĶ<D8B5><C4B6><EFBFBD><EFBFBD>õ<EFBFBD>)
|
||||
uint8_t DiskType; // USB_TYPE - U<>̣<EFBFBD>SD_TYPE - SD<53><44>
|
||||
uint8_t Volume;
|
||||
#ifdef FUNC_SOUND_REMIND
|
||||
uint8_t SoundRemindOn;
|
||||
uint8_t LanguageMode;
|
||||
#endif
|
||||
#ifdef FUNC_BT_HF_EN
|
||||
uint8_t HfVolume;
|
||||
#endif
|
||||
} BP_SYS_INFO;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//**************************************************************************************************************
|
||||
// Breakpoint <20>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽṹ
|
||||
//**************************************************************************************************************
|
||||
typedef struct _BP_INFO_
|
||||
{
|
||||
BP_SYS_INFO SysInfo;
|
||||
|
||||
#if (defined(FUNC_USB_EN) || defined(FUNC_CARD_EN)) // <20><><EFBFBD><EFBFBD>ģʽ<C4A3><CABD><EFBFBD>ݴ洢<DDB4><E6B4A2><EFBFBD><EFBFBD>
|
||||
BP_PLAYER_INFO PlayerInfo;
|
||||
#endif
|
||||
|
||||
#ifdef FUNC_RADIO_EN // FMģʽ<C4A3><CABD><EFBFBD>ݴ洢<DDB4><E6B4A2><EFBFBD><EFBFBD>
|
||||
BP_RADIO_INFO RadioInfo;
|
||||
#endif
|
||||
|
||||
uint8_t Crc;
|
||||
|
||||
} BP_INFO;
|
||||
|
||||
|
||||
|
||||
typedef enum _BP_SAVE_TYPE_
|
||||
{
|
||||
BP_SAVE2NVM,
|
||||
BP_SAVE2FLASH,
|
||||
BP_SAVE2EEPROM,
|
||||
BP_SAVE2NVM_FLASH,
|
||||
BP_SAVE2NVM_EEPROM
|
||||
}BP_SAVE_TYPE;
|
||||
|
||||
typedef enum _BP_INFO_TYPE_
|
||||
{
|
||||
BP_SYS_INFO_TYPE,
|
||||
BP_PLAYER_INFO_TYPE,
|
||||
BP_RADIO_INFO_TYPE,
|
||||
}BP_INFO_TYPE;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
bool EraseFlashOfUserArea(void);
|
||||
void BP_InfoLog(void);
|
||||
uint8_t GetCrc8CheckSum(uint8_t* ptr, uint32_t len); // <20><><EFBFBD><EFBFBD>CRC
|
||||
void BP_LoadInfo(void);
|
||||
void* BP_GetInfo(BP_INFO_TYPE InfoType);
|
||||
bool BP_SaveInfo(BP_SAVE_TYPE SaveType);
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif//__cplusplus
|
||||
|
||||
#endif/*__BREAKPOINT_H_*/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Mountain View Silicon Tech. Inc.
|
||||
// Copyright 2012, Mountain View Silicon Tech. Inc., Shanghai, China
|
||||
// All rights reserved.
|
||||
// Filename: breakpoint.h
|
||||
// ChangLog :
|
||||
// <09><EFBFBD>bp ģ<><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ2014-9-26 <20><>lujiangang
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef __BREAKPOINT_H__
|
||||
#define __BREAKPOINT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif//__cplusplus
|
||||
|
||||
// Disk<73><6B><EFBFBD><EFBFBD>
|
||||
#define UNKNOWN_DISK_TYPE -1
|
||||
#define NONE_DISK 0 // û<>в<EFBFBD><D0B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define USB_TYPE 1 // U<><55>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
#define SD_TYPE 2 // SD<53><44>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
#ifdef FUNC_BREAKPOINT_EN
|
||||
|
||||
#define BP_MAX_SIZE 115 //BP <20><>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD>ֽ<EFBFBD><D6BD><EFBFBD>(<28><><EFBFBD>ǵ<EFBFBD>NVM<56>ռ<EFBFBD><D5BC><EFBFBD><EFBFBD><EFBFBD>)
|
||||
#define BP_SIGNATURE 0x5A
|
||||
#define BP_SET_ELEMENT(a, b) a = b
|
||||
#define BP_GET_ELEMENT(x) x
|
||||
#pragma pack(1)
|
||||
|
||||
|
||||
//**************************************************************************************************************
|
||||
// PLAYER <20><><EFBFBD>ضϵ<D8B6><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽṹ
|
||||
// ע<><D7A2>:: <20><EFBFBD>BP_PLAYER_INFO <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>sInitPlayerInfo <20><><EFBFBD><EFBFBD>
|
||||
//**************************************************************************************************************
|
||||
#if defined(FUNC_USB_EN) || defined(FUNC_CARD_EN) //PLAYER <20><><EFBFBD>ݴ洢<DDB4>ṹ
|
||||
|
||||
#define PLAYER_DISK_BP_CNT 3
|
||||
|
||||
typedef struct _BP_PLAY_DISK_INFO_
|
||||
{
|
||||
uint32_t FileAddr; // <20>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
uint16_t PlayTime; // <20><><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1>
|
||||
uint8_t CRC8; // <20>ļ<EFBFBD><C4BC><EFBFBD>У<EFBFBD><D0A3><EFBFBD><EFBFBD>
|
||||
#ifdef FUNC_FOLDER_PLAY_EN
|
||||
uint8_t FolderEnFlag; //<2F>ļ<EFBFBD><C4BC><EFBFBD>ʹ<EFBFBD>ܱ<EFBFBD>־
|
||||
#endif
|
||||
} BP_PLAY_DISK_INFO;
|
||||
|
||||
typedef struct _BP_PLAYER_INFO_ // <20><><EFBFBD><EFBFBD>ģʽ <20><><EFBFBD>ݴ洢<DDB4>ṹ
|
||||
{
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
uint8_t PlayerVolume; // Volume:0--32
|
||||
// <20><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD>ģʽ
|
||||
uint8_t PlayMode : 3; // Play mode
|
||||
// <20><>ǰEQ<45><51><EFBFBD><EFBFBD>
|
||||
uint8_t Eq : 4; // EQ
|
||||
// <20><><EFBFBD>ʿ<EFBFBD><CABF><EFBFBD>
|
||||
uint8_t LrcFlag : 1; // Lrc
|
||||
// <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
|
||||
BP_PLAY_DISK_INFO PlayDiskInfo[PLAYER_DISK_BP_CNT];
|
||||
} BP_PLAYER_INFO;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
//**************************************************************************************************************
|
||||
// Radio <20><><EFBFBD>ضϵ<D8B6><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽṹ
|
||||
// ע<><D7A2>:: <20><EFBFBD>BP_RADIO_INFO <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>sInitRadioInfo <20><><EFBFBD><EFBFBD>
|
||||
//**************************************************************************************************************
|
||||
#ifdef FUNC_RADIO_EN
|
||||
typedef struct _BP_RADIO_INFO_
|
||||
{
|
||||
uint8_t StationList[50]; // <20>ѱ<EFBFBD><D1B1><EFBFBD><EFBFBD><EFBFBD>̨<EFBFBD>б<EFBFBD>/*MAX_RADIO_CHANNEL_NUM*/
|
||||
uint8_t RadioVolume : 6; // FM<46><4D><EFBFBD><EFBFBD>
|
||||
uint8_t CurBandIdx : 2; // <20><>ǰFM<46><4D><EFBFBD>η<EFBFBD>Χ(00B<30><42>87.5~108MHz (US/Europe, China)<29><>01B<31><42>76~90MHz (Japan)<29><>10B<30><42>65.8~73MHz (Russia)<29><>11B<31><42>60~76MHz
|
||||
uint8_t StationCount; // <20>ѱ<EFBFBD><D1B1><EFBFBD><EFBFBD><EFBFBD>̨<EFBFBD><CCA8><EFBFBD><EFBFBD>
|
||||
uint16_t CurFreq; // <20><>ǰ<EFBFBD><C7B0>̨Ƶ<CCA8><C6B5>
|
||||
} BP_RADIO_INFO;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
//**************************************************************************************************************
|
||||
// SYSTEM <20><><EFBFBD>ضϵ<D8B6><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽṹ
|
||||
// ע<><D7A2>:: <20><EFBFBD>BP_SYS_INFO <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>sInitSysInfo <20><><EFBFBD><EFBFBD>
|
||||
//**************************************************************************************************************
|
||||
typedef struct _BP_SYS_INFO_
|
||||
{
|
||||
uint8_t VaildFlag; // Only when this field is equal to BP_SIGNATURE, this structure is valid.
|
||||
// <20><>ǰӦ<C7B0><D3A6>ģʽ
|
||||
uint8_t CurModuleId; // system function mode.
|
||||
// <20><>ǰ<EFBFBD><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD>ģʽ<C4A3><CABD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>صĶ<D8B5><C4B6><EFBFBD><EFBFBD>õ<EFBFBD>)
|
||||
uint8_t DiskType; // USB_TYPE - U<>̣<EFBFBD>SD_TYPE - SD<53><44>
|
||||
uint8_t Volume;
|
||||
#ifdef FUNC_SOUND_REMIND
|
||||
uint8_t SoundRemindOn;
|
||||
uint8_t LanguageMode;
|
||||
#endif
|
||||
#ifdef FUNC_BT_HF_EN
|
||||
uint8_t HfVolume;
|
||||
#endif
|
||||
} BP_SYS_INFO;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//**************************************************************************************************************
|
||||
// Breakpoint <20>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽṹ
|
||||
//**************************************************************************************************************
|
||||
typedef struct _BP_INFO_
|
||||
{
|
||||
BP_SYS_INFO SysInfo;
|
||||
|
||||
#if (defined(FUNC_USB_EN) || defined(FUNC_CARD_EN)) // <20><><EFBFBD><EFBFBD>ģʽ<C4A3><CABD><EFBFBD>ݴ洢<DDB4><E6B4A2><EFBFBD><EFBFBD>
|
||||
BP_PLAYER_INFO PlayerInfo;
|
||||
#endif
|
||||
|
||||
#ifdef FUNC_RADIO_EN // FMģʽ<C4A3><CABD><EFBFBD>ݴ洢<DDB4><E6B4A2><EFBFBD><EFBFBD>
|
||||
BP_RADIO_INFO RadioInfo;
|
||||
#endif
|
||||
|
||||
uint8_t Crc;
|
||||
|
||||
} BP_INFO;
|
||||
|
||||
|
||||
|
||||
typedef enum _BP_SAVE_TYPE_
|
||||
{
|
||||
BP_SAVE2NVM,
|
||||
BP_SAVE2FLASH,
|
||||
BP_SAVE2EEPROM,
|
||||
BP_SAVE2NVM_FLASH,
|
||||
BP_SAVE2NVM_EEPROM
|
||||
}BP_SAVE_TYPE;
|
||||
|
||||
typedef enum _BP_INFO_TYPE_
|
||||
{
|
||||
BP_SYS_INFO_TYPE,
|
||||
BP_PLAYER_INFO_TYPE,
|
||||
BP_RADIO_INFO_TYPE,
|
||||
}BP_INFO_TYPE;
|
||||
|
||||
#pragma pack()
|
||||
|
||||
bool EraseFlashOfUserArea(void);
|
||||
void BP_InfoLog(void);
|
||||
uint8_t GetCrc8CheckSum(uint8_t* ptr, uint32_t len); // <20><><EFBFBD><EFBFBD>CRC
|
||||
void BP_LoadInfo(void);
|
||||
void* BP_GetInfo(BP_INFO_TYPE InfoType);
|
||||
bool BP_SaveInfo(BP_SAVE_TYPE SaveType);
|
||||
|
||||
#endif
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif//__cplusplus
|
||||
|
||||
#endif/*__BREAKPOINT_H_*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user