⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 targetreference_13.h

📁 用 Hitex 工具软件开发 stm32 的例子
💻 H
📖 第 1 页 / 共 2 页
字号:
/* Hitex Development Tools GmbH Gn                19.08.2007   */
/* Communication References for STM32-Stick                    */
/* target communication definitions                            */
/* process params                                              */

#ifndef __TARGET_REF_H__
#define __TARGET_REF_H__

#define   HW_Version                   0x00000001
#define   FW_Version                   0x0105;

#define   Target_Initial_String        "STM32-Target"
#define   Target_Initial_String_Length 12

#define   HardwareVersion              1
#define   Ext_None                     0
#define   Ext_IOBrd                    1
#define   Ext_SensorBrd                2
#define   Ext_BluetoothBrd             3
#define   Ext_PatchBrd                 4
#define   Ext_Unknown                  10

#define   ADC1_DR_Address              ((u32)0x4001244C)

#define   MSG_FrameType_S              0xFE   /* Defines frame type S (supply) */
#define   MSG_FrameType_T              0xFF   /* Defines frame type T (target) */

#define   TaskSwitchOff                0x01   /* bit coding off state */
#define   TaskSwitchOn                 0x02   /* bit coding on state */

/* idle message */
#define   MSG_Idle                     0x00   /* No message */
#define   Cmd_Idle                     0x00

/* Error and condition numbers (MSG_Error) */
#define   Err_Unknown                  0x00   /* Unknown error */
#define   Err_Checksum                 0x01   /* Frame incorrect checksum */
#define   Err_NotImplemented           0x02   /* Not implemented message */


/*        Function                     ID       Length typ Initiator   Purpose   */
/*      General ?4.1                     */
#define   Cmd_SWReset                  0x0F   /*   0   T   GUI   Software-reset the device   */
#define   Rep_Initial_String           0x0A   /*   Str-Length   T   App   Identification after Reset   */
#define   Cmd_Get_Setup                0x0B   /*   0   T   GUI   Request for Hardware stet and adapter   */
#define   Rep_Info_Setup               0x0B   /*   4   T   App   Reply of Hardware set and adapter   */
#define   Cmd_GUI_present              0x0C   /*   0   T   GUI   Tell the application the presence of the GUI   */
#define   Cmd_Dummy                    0x01   /*   X   T   GUI   Generally ignored   */
#define   Rep_MSG_TimedOut             0x02   /*   0   T   App   Message was timed out   */
#define   Rep_Error                    0x03   /*   1   T   App   Some error and condition number   */
#define   Cmd_Get_Firmware_Version     0x05   /*   0   T   GUI   Request the Version of the firmware   */
#define   Rep_Info_Firmware_Version    0x05   /*   2   T   App   Reply the Version of the firmware   */
/*      Power ?4.2                     */
#define   Cmd_Get_PLL_Settings         0x10   /*   0   T   GUI   Status request of the PLL   */
#define   Rep_Info_PLL_Settings        0x10   /*   5   T   App   PLL state   */
#define   Cmd_Get_Power_Mode           0x11   /*   0   T   GUI   Request the Power Mode settings   */
#define   Rep_Info_Power_Mode          0x11   /*   2   T   App   Reply Power Mode settings   */
#define   Cmd_Set_Power_Mode           0x12   /*   2   T   GUI   Set the Power Mode   */
#define   Cmd_Get_Periph_Gating        0x13   /*   0   T   GUI   Request the peripheral Gating set   */
#define   Rep_Info_Periph_Gating       0x13   /*   6   T   App   Reply the peripheral Gating set   */
#define   Cmd_Set_Periph_Gating        0x14   /*   6   T   GUI   Set the peripheral Gating   */
#define   Cmd_Set_PLL_Settings         0x15   /*   5   T   GUI   Set the PLL and clock divider */

#define   Cmd_Get_CPU_Clock            0x16   /*   0   S   GUI   Request CPU Clock State */
#define   Rep_Info_CPU_Clock           0x16   /*   1   S   App   Reply CPU Clock State */
#define   Cmd_Set_CPU_Clock            0x17   /*   1   S   GUI   Set CPU clock state */
#define   Cmd_Get_Backup_Data          0x18   /*   0   T   GUI   Request for Backup Data */
#define   Rep_Info_Backup_Data         0x18   /*   10  T   App   Reply for Backup Data */
#define   Cmd_Set_Backup_Data          0x19   /*   0   T   GUI   Set of Backup Data */
#define   Cmd_Get_RTC                  0x1A   /*   0   T   GUI   Request the RTC settings   */
#define   Rep_Info_RTC                 0x1A   /*   4   T   App   Reply the RTC settings   */
#define   Cmd_Set_RTC                  0x1B   /*   4   T   GUI   Set the RTC s,m,h,d,d,d,m,y   */
#define   Cmd_Get_RTC_Alarm            0x1C   /*   0   T   GUI   Request the RTC Alarm settings   */
#define   Rep_Info_RTC_Alarm           0x1C   /*   4   T   App   Reply the RTC Alarm settings   */
#define   Cmd_Set_RTC_Alarm            0x1D   /*   4   T   GUI   Set the RTC Alarm   */
#define   Cmd_Set_Stick_LED            0x1E   /*   1   T   GUI   Set the LED mode off, on, blink */
/*      Standalone ?4.3                     */
#define   Cmd_Get_SA                   0x20   /*   0   T   GUI   Request Stand alone features   */
#define   Rep_Info_SA                  0x20   /*   length   T   App   Reply Stand alone features   */
#define   Cmd_Set_SA                   0x21   /*   length   T   GUI   Set Stand alone features   */
#define   Cmd_Reset_SA                 0x22   /*   0   T   GUI   Reset/delete all Stand Alone Features   */
#define   Rep_Info_Reset_SA            0x22   /*   0   T   App   Reset/delete all Stand Alone Features done   */
/*      Flash ?4.4                     */
#define   Cmd_Flash_Reset              0x22   /*   0   T   GUI   Reset the Flash address   */
#define   Cmd_Protect_Flash            0x23   /*   1   T   GUI   Set/reset FLASH protection   */
#define   Cmd_Fill_FLASH               0x25   /*   0   T   GUI   Fill FLASH with numbers   */
#define   Cmd_Flash_Read               0x26   /*   length   T   GUI   Read flash (address, length)   */
#define   Rep_Flash_Data               0x26   /*   length   T   App   Reply with data from flash   */
#define   Cmd_Flash_Write              0x27   /*   length   T   GUI   Write to flash (address, length, data)   */
#define   Rep_Info_Flash_Write         0x27   /*   0   T   App   Write to flash finished   */
#define   Cmd_Erase_Flash              0x28   /*   8   T   GUI   Erase flash (address, length)   */
#define   Rep_Erase_Flash              0x28   /*   0   T   App   Erase flash (address, length)   */
/*      Application ?4.5                     */
#define   Cmd_Start_Appl               0x31   /*   1   S   GUI   Start Application Number */
#define   Cmd_Get_IRQ_Occ              0x33   /*   0   S   GUI   Request IRQ Occurrence 1-255 */
#define   Rep_Info_IRQ_Occ             0x33   /*   1   S   GUI   Reply IRQ Occurrence 1-255 */
#define   Cmd_Set_IRQ_Occ              0x34   /*   1   S   GUI   Set IRQ Occurrence 1-255 */
#define   Cmd_Get_ExeTime              0x35   /*   0   S   GUI   Request ExecTime */
#define   Rep_Info_ExeTime             0x35   /*   4   S   App   Reply ExecTime */
/*      USB ?4.5                     */
#define   Cmd_Get_USB                  0x40   /*   0   T   GUI   Status request of the USB enabled, Application and Enumeration   */
#define   Cmd_Enable_USB               0x45   /*   1   T   GUI   Start/Stop the USB   */
#define   Cmd_Get_VIDPID_Str           0x41   /*   0   T   GUI   Request of VID and PID   */
#define   Cmd_Get_Serial_Str           0x42   /*   0   T   GUI   Request of serial Nr string descriptor   */
#define   Cmd_Get_Prod_Str             0x43   /*   0   T   GUI   Request of product string descriptor   */
#define   Cmd_Get_Pwr_Def              0x44   /*   0   T   GUI   Request of Power definitions   */
#define   Cmd_Get_Version              0x46   /*   0   T   GUI   Request of Version descriptor   */
#define   Cmd_Enable_USB_APP           0x47   /*   1   T   GUI   Start/Stop the USB-Application (Mouse)   */
#define   Cmd_Get_Poll_Intervall       0x48   /*   0   T   GUI   Request the polling interval   */
#define   Cmd_Get_Config_Application   0x49   /*   0   T   GUI   Request the applications parameter   */
#define   Rep_Info_USB                 0x40   /*   1   T   App   Answer to status request and enumeration   */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -