Commit bc9204ac authored by 张金硕's avatar 张金硕

🐞 fix:对应绥化需求,130和120的板子都能亮的临时展示程序

parent fe6c0b86
......@@ -1034,9 +1034,9 @@
<FilePath>..\..\..\..\Source\Component\AMT630H\UartProtocol.h</FilePath>
</File>
<File>
<FileName>UartProtocol_Test_BW121_Bat32_241219.lib</FileName>
<FileName>keil_S1.0.8_20240924.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\UartProtocol_Test_BW121_Bat32_241219.lib</FilePath>
<FilePath>..\..\..\..\Source\Component\AMT630H\keil_S1.0.8_20240924.lib</FilePath>
</File>
</Files>
</Group>
......
......@@ -11,8 +11,7 @@ __align(4) /* 四字节对齐 */
unsigned int AMT630H_InitTime = 0;
uint8_t g_sysFlag_Lcdcheck = 0;
/* Initialization */
LCD_TFT_PARA_ST LcdSoundParamterData;
LCD_TFT_MIPI_PARA_ST LcdMipiSoundParamterDate;
LCD_TFT_SOUND_PARA_ST LcdSoundParamterData;
SOFTWARE_VERSION_ST amt630Version;
uint8_t Amt630hInitFinishFlag = 0;
......@@ -267,14 +266,7 @@ void Amt630hInit(void)
LcdSoundParamterData.SoundChannelNum = 0;
LcdSoundParamterData.SoundFreq = AUDIO_FREQ_48K;
LcdMipiSoundParamterDate.MipiClkFreq = 0;
LcdMipiSoundParamterDate.MipiDisplaymMode = 0;
LcdMipiSoundParamterDate.MipiLane = 0;
LcdMipiSoundParamterDate.MipiNpPolarityInverse = 0;
RN6752_PARA_ST* LcdSoundRn6752ParamterDate = NULL;
// SetLcdSoundParameter(&LcdSoundParamterData);
SetLcdParameter(&LcdSoundParamterData,&LcdMipiSoundParamterDate,AMT630_UART3,LcdSoundRn6752ParamterDate);
SetLcdSoundParameter(&LcdSoundParamterData);
SetSwVerBuf((uint8_t*)&amt630Version);
User_PicIndexDataInit();
......
......@@ -7,7 +7,6 @@ typedef unsigned short uint16_t;
typedef short int16_t;
typedef unsigned char uint8_t;
#define AMT_NULL 0
#define UART_UPDATE_ACK_NONE 0
#define UART_UPDATE_ACK_OK 1
......@@ -41,7 +40,11 @@ extern void UartSendData(uint8_t *data, uint32_t len);
extern void AnalysisUartData(void);
/* Generate Function end */
/* Lcd Parameter */
/* Sound */
#define SOUND_STATE_FREE 0
#define SOUND_STATE_BUSY 1
#define WAV_TEST_NUM_TIC 0xfd
#define WAV_TEST_NUM_TOC 0xfe
enum {
AUDIO_FREQ_NONE,
AUDIO_FREQ_8K,
......@@ -58,12 +61,13 @@ enum {
AUDIO_FREQ_192K,
AUDIO_FREQ_TOTAL,
};
typedef enum {
AMT630_UART1 = 1,
AMT630_UART2,
AMT630_UART3,
} AMT630_UART_CH_TYPE;
extern void PackedTransfer_SoundPlay(uint8_t Channel, uint8_t WavNum, uint16_t PlayTimes, uint16_t MinTimes, uint8_t Volume);
extern void PackedTransfer_SoundStop(uint8_t Channel);
extern void PackedTransfer_SoundChangeVolume(uint8_t Channel, uint8_t Volume);
extern uint8_t GetSoundChannelSta(uint8_t Channel);
/* Sound end */
/* Lcd Parameter */
#define LCD_WIRING_MODE_RGB 0
#define LCD_WIRING_MODE_RBG 1
#define LCD_WIRING_MODE_GRB 2
......@@ -73,7 +77,6 @@ typedef enum {
#define LCD_INTERFACE_TTL 0
#define LCD_INTERFACE_LVDS 1
#define LCD_INTERFACE_MIPI 2
#define LCD_WIRING_BIT_ORDER_MSB 0
#define LCD_WIRING_BIT_ORDER_LSB 1
......@@ -88,13 +91,12 @@ typedef enum {
#define VIDEO_IN_NTSC 1
#define VIDEO_IN_PAL 2
#pragma pack(1)
typedef struct {
uint16_t LcdWidth;
uint16_t LcdHeight;
uint8_t LcdVideoInputValid : 2;
uint8_t LcdBpp : 6;
uint8_t Ark7116ResetPin;
uint8_t Ark7116ResetPin;
uint8_t LcdInterfaceType : 4;
uint8_t LcdWiringMode : 4;
uint8_t LcdWiringBitOrder : 2;
......@@ -110,27 +112,12 @@ typedef struct {
uint32_t LcdClkFreq;
uint8_t SoundFreq;
uint8_t SoundChannelNum;
}LCD_TFT_PARA_ST;
} LCD_TFT_SOUND_PARA_ST;
typedef struct {
uint32_t MipiClkFreq;
uint8_t MipiNpPolarityInverse;
uint8_t MipiLane;
uint8_t MipiDisplaymMode;
}LCD_TFT_MIPI_PARA_ST;
#define RN6752_INPUT_TYPE_NONE 0
#define RN6752_INPUT_TYPE_CVBS_NTSC 1
#define RN6752_INPUT_TYPE_CVBS_PAL 2
#define RN6752_INPUT_TYPE_AHD_720P_25 3
#define RN6752_INPUT_TYPE_AHD_720P_30 4
typedef struct {
uint8_t Rn6752InputType;
uint8_t Rn6752ResetPin;
uint8_t Rn6752Address;
}RN6752_PARA_ST;
#pragma pack()
extern void SetLcdParameter(LCD_TFT_PARA_ST *pData, LCD_TFT_MIPI_PARA_ST *pDataMipi, AMT630_UART_CH_TYPE Amt630UartCh, RN6752_PARA_ST *pDataRn6752);
extern void SetLcdSoundParameter(LCD_TFT_SOUND_PARA_ST *pData);
/* Lcd Parameter end */
/* Amt Software */
......@@ -248,7 +235,7 @@ typedef enum {
TFT_ROT_270,
} TFT_ROT_TYPE;
#define TEXT_ROT_SCALE(r, s) ((((r) & 0xffff) << 16) | ((s) & 0xffff))
#define TEXT_ROT_SCALE (r, s) ((((r) & 0xffff) << 16) | ((s) & 0xffff))
#define TEXT_COLOR(r, g, b, a) ((((r) & 0xff) << 24) | (((g) & 0xff) << 16) | (((b) & 0xff) << 8) | ((a) & 0xff))
#define TEXT_LINE_OFFSET(x, y) ((((x) & 0xffff) << 16) | ((y) & 0xffff))
......@@ -266,9 +253,7 @@ extern void SetPageText(GRAPHICS_PAGE_ENUM page, uint16_t LabelNum, int16_t PosX
extern void SetPagePointerPic(GRAPHICS_PAGE_ENUM page, POINTER_ENUM PointN, uint16_t PicIndex);
extern void SetPagePointerSePic(GRAPHICS_PAGE_ENUM page, POINTER_ENUM PointN);
extern void SetPagePointerTrackPic(GRAPHICS_PAGE_ENUM page, POINTER_ENUM PointN, uint16_t PicIndex);
extern void SetPagePointerTrackActiceArea(GRAPHICS_PAGE_ENUM page, POINTER_ENUM PointN, int16_t ActivePosX, int16_t ActivePosY, uint16_t ActiveW, uint16_t ActiveH);
extern void SetPageSliderNumPic(GRAPHICS_PAGE_ENUM page, uint8_t SliderNum);
extern void SetPageSliderImagePic(GRAPHICS_PAGE_ENUM page, uint8_t SliderImageNum);
extern void PackedTransfer_PicDirectDraw(uint32_t PicIndex, uint8_t Valid);
extern void PackedTransfer_BgJpg(uint32_t PicIndex);
......@@ -334,97 +319,21 @@ extern void PackedTransfer_SetTftIoMode(uint8_t st); /*st 0:normal gpio, 1:TFT i
/* Set tft io mode end */
/* Slider Num */
#pragma pack(1)
#define SLIDER_NUM_MAX 300 /* The maximum value is 300 */
typedef struct {
uint8_t SliderNum;
uint8_t SliderValid;
uint8_t ZoomOutMax;
uint8_t AlphaMin;
float DestVal;
float CurVal;
int16_t PosX;
int16_t PosY;
int16_t Interval;
uint16_t PicNum;
uint16_t DampingVal;
uint16_t PicIndex[SLIDER_NUM_MAX];
} SLIDER_NUMBER_PARA_ST;
#pragma pack()
extern void PackedTransfer_SliderNumData(uint8_t n, uint8_t *data, uint32_t len); /* PackedTransfer_SliderNumData(0, &SliderNumParaData, sizeof (SLIDER_NUMBER_PARA_ST)); */
extern void PackedTransfer_SliderNumData(uint8_t n, uint8_t *data, uint32_t len);
extern void PackedTransfer_SliderNumDestVal(uint8_t n, uint16_t val, uint8_t ForceUpdate, uint8_t DisplayValid);
/* Slider Num end */
/* Slider Image */
#pragma pack(1)
#define SLIDER_IMAGE_PIC_MAX 5 /* The maximum value is 5 */
enum {
SLIDER_IMAGE_TYPE_HORIZONTAL_LEFT_TO_RIGHT,
SLIDER_IMAGE_TYPE_HORIZONTAL_RIGHT_TO_LEFT,
SLIDER_IMAGE_TYPE_VERTICAL_UP_TO_DOWN,
SLIDER_IMAGE_TYPE_VERTICAL_DOWN_TO_UP,
};
typedef struct {
uint8_t SliderType;
uint8_t SliderValid;
uint8_t Reserve1;
uint8_t Reserve2;
float DestVal;
float CurVal;
int16_t PosX;
int16_t PosY;
int16_t Interval;
uint16_t DampingVal;
uint16_t PicIndex[SLIDER_IMAGE_PIC_MAX];
} SLIDER_IMAGE_PARA_ST;
#pragma pack()
extern void PackedTransfer_SliderImageData(uint8_t n, uint8_t *data, uint32_t len); /* The setting range of parameter n is 0~9, PackedTransfer_SliderImageData(0, &SliderImageParaData, sizeof (SLIDER_IMAGE_PARA_ST)); */
extern void PackedTransfer_SliderImageDestVal(uint8_t n, uint16_t val, uint8_t ForceUpdate, uint8_t DisplayValid);
/* Slider Num end */
enum {NUM_0, NUM_1, NUM_2, NUM_3, NUM_4, NUM_5, NUM_6, NUM_7, NUM_8, NUM_9, NUM_POINT, NUM_LINE};
typedef struct {
const uint16_t *NumList;
uint16_t NumListLength;
int16_t NumInterval;
int16_t PointNumInterval;
int16_t PointNumCoorX;
int16_t LineCoorX;
int16_t x;
int16_t y;
int16_t Number1TotalLattice;
int16_t Number1UseLattice;
int16_t Number7TotalLattice;
int16_t Number7UseLattice;
uint8_t DecimalNum;
uint8_t MinDigits;
} DISPLAY_NUM_ST;
typedef struct {
const uint16_t *CharacterList;
uint16_t CharacterLength;
int16_t CharacterInterval;
int16_t PointCharacterInterval;
int16_t PointCharacterCoorX;
int16_t LineCoorX;
int16_t x;
int16_t y;
int16_t Number1TotalLattice;
int16_t Number1UseLattice;
int16_t Number7TotalLattice;
int16_t Number7UseLattice;
}DISPLAY_CHARACTER_ST;
typedef enum {
CHAR_LEFT_JUSTIFYING = 0,
CHAR_RIGHT_JUSTIFYING,
TOTAL_JUSTIFYING_TYPE,
}CHAR_JUSTIFYING_TYPE;
extern void DisplayNum(uint8_t page, DISPLAY_NUM_ST *pNumData, int32_t NumVal);
extern void DisplayCharacter(uint8_t page, DISPLAY_CHARACTER_ST *pCharacterData, char* Character, uint8_t JustifyingType);
/*
note:
......@@ -545,7 +454,7 @@ typedef struct
typedef struct
{
uint8_t BlueToothSignalSate;
uint8_t BlueToothPhoneSate;//incall¡¢outcall
uint8_t BlueToothPhoneSate;//incalloutcall
uint8_t BlueToothPhoneName[100];
uint8_t PhoneNumber[20];
uint16_t PhoneBookTotalCount;
......@@ -569,37 +478,6 @@ typedef struct
uint8_t RoadName[100];
uint32_t distance;
}_NavigationData_struct;
enum BLUE_HELMET_CONNECT_STATE
{
BLUE_HELMET_UNSUPPORTED = 0u,
BLUE_HELMET_STANDBY,
BLUE_HELMET_CONNECTING,
BLUE_HELMET_CONNECTED,
BLUE_HELMET_PASUSED,
BLUE_HELMET_STREAMING,
};
enum BLUE_HELMET_REQUIRE_STATE
{
BLUE_HELMET_SCAN_END = 0u,
BLUE_HELMET_SCAN_STATE,
BLUE_HELMET_MAIN_REQUIRE_STATE,
BLUE_HELMET_MAIN_REQUIRE_END,
BLUE_HELMET_SECOND_REQUIRE_STATE,
BLUE_HELMET_SECOND_REQUIRE_END,
};
typedef struct
{
uint8_t MainheadsetState;
uint8_t SecondheadsetState;
uint8_t MainMacAddressSuccess[20];
uint8_t secondMacAddressSuccess[20];
uint8_t Name[50];
uint8_t ScanMacAddress[20];
}_BLUE_HELMET_DATA_struct;
typedef struct
{
uint16_t x;
......@@ -622,8 +500,8 @@ typedef struct
typedef struct{
uint8_t blearn;
uint8_t strmac[6];
uint8_t temperature;
uint16_t PressureVal;
int temperature;
}ec_stru_TirePressure;
extern ec_stru_TirePressure ec_stru_pressure;
......@@ -632,7 +510,6 @@ extern uint8_t UUID_Received;
extern _BlueToothPhoneData BlueToothPhoneData;
extern _GPS_TIME GPS_Time;
extern _NavigationData_struct NavigationData_st;
extern _BLUE_HELMET_DATA_struct BlueHelmetDate;
extern void PackedTransfer_DisplayPhoneMirrorQRcode(uint8_t data,_PICID_Struct PICID_OBJ);
extern void PackedTransfer_BlueTooth_DataSet(uint8_t data);
extern void PackedTransfer_GetPhoneBookCmd(void);
......@@ -654,6 +531,5 @@ extern void SetBlueToothName(uint8_t *data,uint8_t len);
extern void SetTaskbarHeight(uint16_t height);
extern void Set_Pro_Unique_Identifier(uint8_t *data,uint8_t len);
extern uint8_t GetUpdate(void);
extern void SetBluetoothhelmet(uint8_t data, uint8_t *MacAddress);
extern uint8_t GetWifiConncetState(void);
#endif
......@@ -44,7 +44,7 @@ static void Power_KL30_Init(void)
UART_Channel_Config_st_t loc_config;
eeprom_StoreInfo_Init(); //50us
loc_config.u32UARTChEn = 1U;
loc_config.u32UARTbps = 500000U;
loc_config.u32UARTbps = 115200U;
loc_config.pfnUARTConfirmCallBack = NULL;
loc_config.pfnUARTReadMsgCallBack = Amt630hUartRecvData;
UART_DeInit(UART2); //50us
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment