mirror of
https://github.com/ArteryTek/AT32F415_Firmware_Library.git
synced 2026-05-21 09:22:11 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
716f545aa1 | ||
|
|
95481a671d | ||
|
|
0a93017e07 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -128,7 +128,7 @@ extern "C" {
|
||||
*/
|
||||
#define __AT32F415_LIBRARY_VERSION_MAJOR (0x02) /*!< [31:24] major version */
|
||||
#define __AT32F415_LIBRARY_VERSION_MIDDLE (0x01) /*!< [23:16] middle version */
|
||||
#define __AT32F415_LIBRARY_VERSION_MINOR (0x01) /*!< [15:8] minor version */
|
||||
#define __AT32F415_LIBRARY_VERSION_MINOR (0x05) /*!< [15:8] minor version */
|
||||
#define __AT32F415_LIBRARY_VERSION_RC (0x00) /*!< [7:0] release candidate */
|
||||
#define __AT32F415_LIBRARY_VERSION ((__AT32F415_LIBRARY_VERSION_MAJOR << 24) | \
|
||||
(__AT32F415_LIBRARY_VERSION_MIDDLE << 16) | \
|
||||
@@ -226,7 +226,7 @@ typedef enum IRQn
|
||||
OTGFS1_IRQn = 67, /*!< otgfs1 global interrupt */
|
||||
CMP1_IRQn = 70, /*!< comparator1 global interrupt */
|
||||
CMP2_IRQn = 71, /*!< comparator2 global interrupt */
|
||||
DMA2_Channel6_7_IRQn = 75, /*!< dma2 channel 6 and channel 7 global interrupt */
|
||||
DMA2_Channel6_7_IRQn = 75 /*!< dma2 channel 6 and channel 7 global interrupt */
|
||||
|
||||
} IRQn_Type;
|
||||
|
||||
|
||||
@@ -132,8 +132,8 @@ g_pfnVectors:
|
||||
/* External Interrupts */
|
||||
.word WWDT_IRQHandler /* Window Watchdog Timer */
|
||||
.word PVM_IRQHandler /* PVM through EXINT Line detect */
|
||||
.word TAMPER_IRQHandler /* Tamper */
|
||||
.word ERTC_IRQHandler /* ERTC */
|
||||
.word TAMP_STAMP_IRQHandler /* Tamper and TimeStamps through the EXINT line */
|
||||
.word ERTC_WKUP_IRQHandler /* ERTC Wakeup through the EXINT line */
|
||||
.word FLASH_IRQHandler /* Flash */
|
||||
.word CRM_IRQHandler /* CRM */
|
||||
.word EXINT0_IRQHandler /* EXINT Line 0 */
|
||||
@@ -247,11 +247,11 @@ g_pfnVectors:
|
||||
.weak PVM_IRQHandler
|
||||
.thumb_set PVM_IRQHandler,Default_Handler
|
||||
|
||||
.weak TAMPER_IRQHandler
|
||||
.thumb_set TAMPER_IRQHandler,Default_Handler
|
||||
.weak TAMP_STAMP_IRQHandler
|
||||
.thumb_set TAMP_STAMP_IRQHandler,Default_Handler
|
||||
|
||||
.weak ERTC_IRQHandler
|
||||
.thumb_set ERTC_IRQHandler,Default_Handler
|
||||
.weak ERTC_WKUP_IRQHandler
|
||||
.thumb_set ERTC_WKUP_IRQHandler,Default_Handler
|
||||
|
||||
.weak FLASH_IRQHandler
|
||||
.thumb_set FLASH_IRQHandler,Default_Handler
|
||||
|
||||
@@ -44,8 +44,8 @@ __vector_table
|
||||
; External Interrupts
|
||||
DCD WWDT_IRQHandler ; Window Watchdog Timer
|
||||
DCD PVM_IRQHandler ; PVM through EXINT Line detect
|
||||
DCD TAMPER_IRQHandler ; Tamper
|
||||
DCD ERTC_IRQHandler ; ERTC
|
||||
DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXINT line
|
||||
DCD ERTC_WKUP_IRQHandler ; ERTC Wakeup through the EXINT line
|
||||
DCD FLASH_IRQHandler ; Flash
|
||||
DCD CRM_IRQHandler ; CRM
|
||||
DCD EXINT0_IRQHandler ; EXINT Line 0
|
||||
@@ -188,15 +188,15 @@ WWDT_IRQHandler
|
||||
PVM_IRQHandler
|
||||
B PVM_IRQHandler
|
||||
|
||||
PUBWEAK TAMPER_IRQHandler
|
||||
PUBWEAK TAMP_STAMP_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
TAMPER_IRQHandler
|
||||
B TAMPER_IRQHandler
|
||||
TAMP_STAMP_IRQHandler
|
||||
B TAMP_STAMP_IRQHandler
|
||||
|
||||
PUBWEAK ERTC_IRQHandler
|
||||
PUBWEAK ERTC_WKUP_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
ERTC_IRQHandler
|
||||
B ERTC_IRQHandler
|
||||
ERTC_WKUP_IRQHandler
|
||||
B ERTC_WKUP_IRQHandler
|
||||
|
||||
PUBWEAK FLASH_IRQHandler
|
||||
SECTION .text:CODE:REORDER:NOROOT(1)
|
||||
|
||||
Binary file not shown.
@@ -78,6 +78,9 @@ typedef enum
|
||||
CMP_SPEED_SLOW = 0x01, /*!< comparator selected slow speed */
|
||||
} cmp_speed_type;
|
||||
|
||||
#define CMP_OUTPUT_TMR1CXORAW_OFF CMP_OUTPUT_TMR1CHCLR
|
||||
#define CMP_OUTPUT_TMR2CXORAW_OFF CMP_OUTPUT_TMR2CHCLR
|
||||
#define CMP_OUTPUT_TMR3CXORAW_OFF CMP_OUTPUT_TMR3CHCLR
|
||||
/**
|
||||
* @brief cmp output type
|
||||
*/
|
||||
|
||||
@@ -133,7 +133,7 @@ typedef enum
|
||||
CRM_I2C1_PERIPH_CLOCK = MAKE_VALUE(0x1C, 21), /*!< i2c1 periph clock */
|
||||
CRM_I2C2_PERIPH_CLOCK = MAKE_VALUE(0x1C, 22), /*!< i2c2 periph clock */
|
||||
CRM_CAN1_PERIPH_CLOCK = MAKE_VALUE(0x1C, 25), /*!< can1 periph clock */
|
||||
CRM_PWC_PERIPH_CLOCK = MAKE_VALUE(0x1C, 28), /*!< pwc periph clock */
|
||||
CRM_PWC_PERIPH_CLOCK = MAKE_VALUE(0x1C, 28) /*!< pwc periph clock */
|
||||
|
||||
} crm_periph_clock_type;
|
||||
|
||||
@@ -174,7 +174,7 @@ typedef enum
|
||||
CRM_I2C1_PERIPH_RESET = MAKE_VALUE(0x10, 21), /*!< i2c1 periph reset */
|
||||
CRM_I2C2_PERIPH_RESET = MAKE_VALUE(0x10, 22), /*!< i2c2 periph reset */
|
||||
CRM_CAN1_PERIPH_RESET = MAKE_VALUE(0x10, 25), /*!< can1 periph reset */
|
||||
CRM_PWC_PERIPH_RESET = MAKE_VALUE(0x10, 28), /*!< pwc periph reset */
|
||||
CRM_PWC_PERIPH_RESET = MAKE_VALUE(0x10, 28) /*!< pwc periph reset */
|
||||
|
||||
} crm_periph_reset_type;
|
||||
|
||||
@@ -268,7 +268,7 @@ typedef enum
|
||||
CRM_PLL_FREF_8M = 2, /*!< pll refrence clock between 7.8125 mhz and 8.33 mhz */
|
||||
CRM_PLL_FREF_12M = 3, /*!< pll refrence clock between 8.33 mhz and 12.5 mhz */
|
||||
CRM_PLL_FREF_16M = 4, /*!< pll refrence clock between 15.625 mhz and 20.83 mhz */
|
||||
CRM_PLL_FREF_25M = 5, /*!< pll refrence clock between 20.83 mhz and 31.255 mhz */
|
||||
CRM_PLL_FREF_25M = 5 /*!< pll refrence clock between 20.83 mhz and 31.255 mhz */
|
||||
} crm_pll_fref_type;
|
||||
|
||||
/**
|
||||
|
||||
@@ -498,6 +498,7 @@ void dma_data_number_set(dma_channel_type* dmax_channely, uint16_t data_number);
|
||||
uint16_t dma_data_number_get(dma_channel_type* dmax_channely);
|
||||
void dma_interrupt_enable(dma_channel_type* dmax_channely, uint32_t dma_int, confirm_state new_state);
|
||||
flag_status dma_flag_get(uint32_t dmax_flag);
|
||||
flag_status dma_interrupt_flag_get(uint32_t dmax_flag);
|
||||
void dma_flag_clear(uint32_t dmax_flag);
|
||||
|
||||
|
||||
|
||||
@@ -85,6 +85,7 @@ extern "C" {
|
||||
typedef enum
|
||||
{
|
||||
EXINT_LINE_INTERRUPUT = 0x00, /*!< external interrupt line interrupt mode */
|
||||
EXINT_LINE_INTERRUPT = 0x00, /*!< same as EXINT_LINE_INTERRUPUT, fixed spelling error */
|
||||
EXINT_LINE_EVENT = 0x01 /*!< external interrupt line event mode */
|
||||
} exint_line_mode_type;
|
||||
|
||||
|
||||
@@ -687,10 +687,10 @@ uint16_t adc_ordinary_conversion_data_get(adc_type *adc_x)
|
||||
* ADC1.
|
||||
* @param adc_preempt_channel: select the preempt channel.
|
||||
* this parameter can be one of the following values:
|
||||
* - ADC_PREEMPTED_CHANNEL_1
|
||||
* - ADC_PREEMPTED_CHANNEL_2
|
||||
* - ADC_PREEMPTED_CHANNEL_3
|
||||
* - ADC_PREEMPTED_CHANNEL_4
|
||||
* - ADC_PREEMPT_CHANNEL_1
|
||||
* - ADC_PREEMPT_CHANNEL_2
|
||||
* - ADC_PREEMPT_CHANNEL_3
|
||||
* - ADC_PREEMPT_CHANNEL_4
|
||||
* @retval the conversion data for selection preempt channel.
|
||||
*/
|
||||
uint16_t adc_preempt_conversion_data_get(adc_type *adc_x, adc_preempt_channel_type adc_preempt_channel)
|
||||
|
||||
@@ -271,6 +271,52 @@ void dma_flexible_config(dma_type* dma_x, uint8_t flex_channelx, dma_flexible_re
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get dma interrupt flag
|
||||
* @param dmax_flag
|
||||
* this parameter can be one of the following values:
|
||||
* - DMA1_FDT1_FLAG - DMA1_HDT1_FLAG - DMA1_DTERR1_FLAG
|
||||
* - DMA1_FDT2_FLAG - DMA1_HDT2_FLAG - DMA1_DTERR2_FLAG
|
||||
* - DMA1_FDT3_FLAG - DMA1_HDT3_FLAG - DMA1_DTERR3_FLAG
|
||||
* - DMA1_FDT4_FLAG - DMA1_HDT4_FLAG - DMA1_DTERR4_FLAG
|
||||
* - DMA1_FDT5_FLAG - DMA1_HDT5_FLAG - DMA1_DTERR5_FLAG
|
||||
* - DMA1_FDT6_FLAG - DMA1_HDT6_FLAG - DMA1_DTERR6_FLAG
|
||||
* - DMA1_FDT7_FLAG - DMA1_HDT7_FLAG - DMA1_DTERR7_FLAG
|
||||
* - DMA2_FDT1_FLAG - DMA2_HDT1_FLAG - DMA2_DTERR1_FLAG
|
||||
* - DMA2_FDT2_FLAG - DMA2_HDT2_FLAG - DMA2_DTERR2_FLAG
|
||||
* - DMA2_FDT3_FLAG - DMA2_HDT3_FLAG - DMA2_DTERR3_FLAG
|
||||
* - DMA2_FDT4_FLAG - DMA2_HDT4_FLAG - DMA2_DTERR4_FLAG
|
||||
* - DMA2_FDT5_FLAG - DMA2_HDT5_FLAG - DMA2_DTERR5_FLAG
|
||||
* - DMA2_FDT6_FLAG - DMA2_HDT6_FLAG - DMA2_DTERR6_FLAG
|
||||
* - DMA2_FDT7_FLAG - DMA2_HDT7_FLAG - DMA2_DTERR7_FLAG
|
||||
* @retval state of dma flag
|
||||
*/
|
||||
flag_status dma_interrupt_flag_get(uint32_t dmax_flag)
|
||||
{
|
||||
flag_status status = RESET;
|
||||
uint32_t temp = 0;
|
||||
|
||||
if(dmax_flag > 0x10000000)
|
||||
{
|
||||
temp = DMA2->sts;
|
||||
}
|
||||
else
|
||||
{
|
||||
temp = DMA1->sts;
|
||||
}
|
||||
|
||||
if ((temp & dmax_flag) != (uint16_t)RESET)
|
||||
{
|
||||
status = SET;
|
||||
}
|
||||
else
|
||||
{
|
||||
status = RESET;
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get dma flag
|
||||
* @param dmax_flag
|
||||
|
||||
@@ -83,7 +83,7 @@ void exint_init(exint_init_type *exint_struct)
|
||||
|
||||
if(exint_struct->line_enable != FALSE)
|
||||
{
|
||||
if(exint_struct->line_mode == EXINT_LINE_INTERRUPUT)
|
||||
if(exint_struct->line_mode == EXINT_LINE_INTERRUPT)
|
||||
{
|
||||
EXINT->inten |= line_index;
|
||||
}
|
||||
@@ -167,8 +167,10 @@ flag_status exint_flag_get(uint32_t exint_line)
|
||||
flag_status exint_interrupt_flag_get(uint32_t exint_line)
|
||||
{
|
||||
flag_status status = RESET;
|
||||
uint32_t exint_flag =0;
|
||||
exint_flag = EXINT->intsts & exint_line & EXINT->inten;
|
||||
uint32_t exint_flag = 0;
|
||||
exint_flag = EXINT->intsts & exint_line;
|
||||
exint_flag = exint_flag & EXINT->inten;
|
||||
|
||||
if((exint_flag != (uint16_t)RESET))
|
||||
{
|
||||
status = SET;
|
||||
|
||||
@@ -362,7 +362,7 @@ flash_status_type flash_user_system_data_program(uint32_t address, uint8_t data)
|
||||
|
||||
/**
|
||||
* @brief config erase/program protection for the desired sectors.
|
||||
* @param sector_bits:
|
||||
* @param sector_bits(1:ENABLE, 0:DISABLE)
|
||||
* the pointer of the address of the sectors to be erase/program protected.
|
||||
* the first 31 bits general every bit is used to protect 2 sectors. the bit
|
||||
* 31 is used to protect the rest sectors and extension memory.
|
||||
|
||||
@@ -164,7 +164,14 @@ void i2c_init(i2c_type *i2c_x, i2c_fsmode_duty_cycle_type duty, uint32_t speed)
|
||||
i2c_x->clkctrl_bit.speedmode = TRUE;
|
||||
|
||||
/* set the maximum rise time */
|
||||
i2c_x->tmrise_bit.risetime = (uint16_t)(((freq_mhz * (uint16_t)300) / (uint16_t)1000) + (uint16_t)1);
|
||||
if(speed <= 400000)
|
||||
{
|
||||
i2c_x->tmrise_bit.risetime = (uint16_t)(((freq_mhz * (uint16_t)300) / (uint16_t)1000) + (uint16_t)1);
|
||||
}
|
||||
else
|
||||
{
|
||||
i2c_x->tmrise_bit.risetime = (uint16_t)(((freq_mhz * (uint16_t)120) / (uint16_t)1000) + (uint16_t)1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -632,7 +639,7 @@ flag_status i2c_interrupt_flag_get(i2c_type *i2c_x, uint32_t flag)
|
||||
break;
|
||||
case I2C_RDBF_FLAG:
|
||||
case I2C_TDBE_FLAG:
|
||||
iten = i2c_x->ctrl2_bit.dataien & i2c_x->ctrl2_bit.evtien;
|
||||
iten = i2c_x->ctrl2_bit.dataien && i2c_x->ctrl2_bit.evtien;
|
||||
break;
|
||||
case I2C_BUSERR_FLAG:
|
||||
case I2C_ARLOST_FLAG:
|
||||
@@ -695,13 +702,15 @@ void i2c_flag_clear(i2c_type *i2c_x, uint32_t flag)
|
||||
{
|
||||
i2c_x->sts1 = (uint16_t)~(flag & (uint32_t)0x0000DF00);
|
||||
|
||||
if(i2c_x->sts1 & I2C_ADDR7F_FLAG)
|
||||
if(flag & I2C_ADDR7F_FLAG)
|
||||
{
|
||||
UNUSED(i2c_x->sts1);
|
||||
UNUSED(i2c_x->sts2);
|
||||
}
|
||||
|
||||
if(i2c_x->sts1 & I2C_STOPF_FLAG)
|
||||
|
||||
if(flag & I2C_STOPF_FLAG)
|
||||
{
|
||||
UNUSED(i2c_x->sts1);
|
||||
i2c_x->ctrl1_bit.i2cen = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,6 +105,7 @@ extern "C" {
|
||||
#define USB_SERIAL_STRING 3 /*!< usb standard string type serial */
|
||||
#define USB_CONFIG_STRING 4 /*!< usb standard string type config */
|
||||
#define USB_INTERFACE_STRING 5 /*!< usb standard string type interface */
|
||||
#define USB_WINUSB_OS_STRING 0xEE /*!< usb microsoft os string */
|
||||
|
||||
/**
|
||||
* @brief usb configuration attributes
|
||||
@@ -119,6 +120,12 @@ extern "C" {
|
||||
#define USB_FEATURE_REMOTE_WAKEUP 1 /*!< usb standard feature selectors remote wakeup */
|
||||
#define USB_FEATURE_TEST_MODE 2 /*!< usb standard feature selectors test mode */
|
||||
|
||||
/**
|
||||
* @brief usb winusb feature id
|
||||
*/
|
||||
#define USB_WINUSB_COMPAT_ID 0x04 /*!< usb winusb compat id os descriptor */
|
||||
#define USB_WINUSB_PROPERTIES_ID 0x05 /*!< usb winusb properties id os descriptor */
|
||||
|
||||
/**
|
||||
* @brief usb device connect state
|
||||
*/
|
||||
|
||||
@@ -87,6 +87,11 @@ typedef struct
|
||||
usbd_desc_t *(*get_device_serial_string)(void); /*!< get device serial callback */
|
||||
usbd_desc_t *(*get_device_interface_string)(void); /*!< get device interface string callback */
|
||||
usbd_desc_t *(*get_device_config_string)(void); /*!< get device device config callback */
|
||||
#if (USBD_SUPPORT_WINUSB == 1)
|
||||
usbd_desc_t *(*get_device_winusb_os_string)(void); /*!< get winusb os string */
|
||||
usbd_desc_t *(*get_device_winusb_os_feature)(void); /*!< get winusb os feature */
|
||||
usbd_desc_t *(*get_device_winusb_os_property)(void); /*!< get winusb os property */
|
||||
#endif
|
||||
}usbd_desc_handler;
|
||||
|
||||
/**
|
||||
@@ -131,8 +136,8 @@ typedef struct
|
||||
|
||||
uint8_t device_addr; /*!< device address */
|
||||
uint8_t remote_wakup; /*!< remote wakeup state */
|
||||
uint8_t default_config; /*!< usb default config state */
|
||||
uint8_t dev_config; /*!< usb device config state */
|
||||
uint32_t default_config; /*!< usb default config state */
|
||||
uint32_t dev_config; /*!< usb device config state */
|
||||
uint32_t config_status; /*!< usb configure status */
|
||||
}usbd_core_type;
|
||||
|
||||
|
||||
@@ -101,6 +101,20 @@ static usb_sts_type usbd_get_descriptor(usbd_core_type *udev)
|
||||
case USB_INTERFACE_STRING:
|
||||
desc = udev->desc_handler->get_device_interface_string();
|
||||
break;
|
||||
case USB_WINUSB_OS_STRING:
|
||||
#if (USBD_SUPPORT_WINUSB == 1)
|
||||
if(udev->desc_handler->get_device_winusb_os_string != NULL)
|
||||
{
|
||||
desc = udev->desc_handler->get_device_winusb_os_string();
|
||||
}
|
||||
else
|
||||
{
|
||||
usbd_ctrl_unsupport(udev);
|
||||
}
|
||||
#else
|
||||
usbd_ctrl_unsupport(udev);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
udev->class_handler->setup_handler(udev, &udev->setup);
|
||||
return ret;
|
||||
@@ -244,6 +258,10 @@ static usb_sts_type usbd_set_feature(usbd_core_type *udev)
|
||||
udev->class_handler->setup_handler(udev, &udev->setup);
|
||||
usbd_ctrl_send_status(udev);
|
||||
}
|
||||
else
|
||||
{
|
||||
usbd_ctrl_unsupport(udev);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -334,7 +334,7 @@ void usbh_hch_out_handler(usbh_core_type *uhost, uint8_t chn)
|
||||
}
|
||||
else if(uhost->hch[chn].state == HCH_STALL)
|
||||
{
|
||||
uhost->hch[chn].urb_sts = URB_STALL;
|
||||
uhost->urb_state[chn] = URB_STALL;
|
||||
}
|
||||
else if(uhost->hch[chn].state == HCH_XACTERR ||
|
||||
uhost->hch[chn].state == HCH_DATATGLERR)
|
||||
|
||||
@@ -277,13 +277,18 @@ static usb_sts_type class_hid_setup_handler(void *udev, usb_setup_type *setup)
|
||||
{
|
||||
len = MIN(USBD_AUHID_HID_SIZ_REPORT_DESC, setup->wLength);
|
||||
buf = (uint8_t *)g_usbd_audio_hid_report;
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
}
|
||||
else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE)
|
||||
{
|
||||
len = MIN(9, setup->wLength);
|
||||
buf = (uint8_t *)g_audio_hid_usb_desc;
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
usbd_ctrl_unsupport(pudev);
|
||||
}
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
break;
|
||||
case USB_STD_REQ_GET_INTERFACE:
|
||||
usbd_ctrl_send(pudev, (uint8_t *)&paudio_hid->alt_setting, 1);
|
||||
|
||||
@@ -506,7 +506,7 @@ ALIGNED_HEAD uint8_t g_usbd_audio_hid_report[USBD_AUHID_HID_SIZ_REPORT_DESC] ALI
|
||||
0x85, HID_REPORT_ID_6, /* REPORT_ID (0xF0) */
|
||||
0x09, 0x06, /* USAGE */
|
||||
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
||||
0x26, 0x00,0xff, /* LOGICAL_MAXIMUM (255) */
|
||||
0x26, 0xFF,0x00, /* LOGICAL_MAXIMUM (255) */
|
||||
0x75, 0x08, /* REPORT_SIZE (8) */
|
||||
0x95, 0x3F, /* REPORT_COUNT (64) */
|
||||
0x91, 0x02, /* OUTPUT(Data,Var,Abs,Vol) */
|
||||
@@ -516,7 +516,7 @@ ALIGNED_HEAD uint8_t g_usbd_audio_hid_report[USBD_AUHID_HID_SIZ_REPORT_DESC] ALI
|
||||
0x85, HID_REPORT_ID_6, /* REPORT_ID (0xF0) */
|
||||
0x09, 0x07, /* USAGE */
|
||||
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
||||
0x26, 0x00,0xff, /* LOGICAL_MAXIMUM (255) */
|
||||
0x26, 0xFF,0x00, /* LOGICAL_MAXIMUM (255) */
|
||||
0x75, 0x08, /* REPORT_SIZE (8) */
|
||||
0x95, 0x3F, /* REPORT_COUNT (64) */
|
||||
0x81, 0x82, /* INPUT(Data,Var,Abs,Vol) */
|
||||
|
||||
@@ -415,13 +415,18 @@ static usb_sts_type keyboard_class_setup_handler(void *udev, usb_setup_type *set
|
||||
{
|
||||
len = MIN(USBD_VCPKYBRD_HID_SIZ_REPORT_DESC, setup->wLength);
|
||||
buf = (uint8_t *)g_usbd_vcpkybrd_hid_report;
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
}
|
||||
else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE)
|
||||
{
|
||||
len = MIN(9, setup->wLength);
|
||||
buf = (uint8_t *)g_vcpkybrd_hid_usb_desc;
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
usbd_ctrl_unsupport(pudev);
|
||||
}
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
break;
|
||||
case USB_STD_REQ_GET_INTERFACE:
|
||||
usbd_ctrl_send(pudev, (uint8_t *)&vcpkybrd->alt_setting, 1);
|
||||
|
||||
@@ -160,13 +160,18 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
|
||||
{
|
||||
len = MIN(USBD_CUSHID_SIZ_REPORT_DESC, setup->wLength);
|
||||
buf = (uint8_t *)g_usbd_custom_hid_report;
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
}
|
||||
else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE)
|
||||
{
|
||||
len = MIN(9, setup->wLength);
|
||||
buf = (uint8_t *)g_custom_hid_usb_desc;
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
usbd_ctrl_unsupport(pudev);
|
||||
}
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
break;
|
||||
case USB_STD_REQ_GET_INTERFACE:
|
||||
usbd_ctrl_send(pudev, (uint8_t *)&pcshid->alt_setting, 1);
|
||||
|
||||
@@ -237,7 +237,7 @@ ALIGNED_HEAD uint8_t g_usbd_custom_hid_report[USBD_CUSHID_SIZ_REPORT_DESC] ALIGN
|
||||
0x85, HID_REPORT_ID_6, /* REPORT_ID (0xF0) */
|
||||
0x09, 0x06, /* USAGE */
|
||||
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
||||
0x26, 0x00,0xff, /* LOGICAL_MAXIMUM (255) */
|
||||
0x26, 0xFF,0x00, /* LOGICAL_MAXIMUM (255) */
|
||||
0x75, 0x08, /* REPORT_SIZE (8) */
|
||||
0x95, 0x3F, /* REPORT_COUNT (64) */
|
||||
0x91, 0x02, /* OUTPUT(Data,Var,Abs,Vol) */
|
||||
@@ -247,7 +247,7 @@ ALIGNED_HEAD uint8_t g_usbd_custom_hid_report[USBD_CUSHID_SIZ_REPORT_DESC] ALIGN
|
||||
0x85, HID_REPORT_ID_6, /* REPORT_ID (0xF0) */
|
||||
0x09, 0x07, /* USAGE */
|
||||
0x15, 0x00, /* LOGICAL_MINIMUM (0) */
|
||||
0x26, 0x00,0xff, /* LOGICAL_MAXIMUM (255) */
|
||||
0x26, 0xFF,0x00, /* LOGICAL_MAXIMUM (255) */
|
||||
0x75, 0x08, /* REPORT_SIZE (8) */
|
||||
0x95, 0x3F, /* REPORT_COUNT (64) */
|
||||
0x81, 0x82, /* INPUT(Data,Var,Abs,Vol) */
|
||||
|
||||
@@ -157,13 +157,18 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
|
||||
{
|
||||
len = MIN(USBD_HIDIAP_SIZ_REPORT_DESC, setup->wLength);
|
||||
buf = (uint8_t *)g_usbd_hidiap_report;
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
}
|
||||
else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE)
|
||||
{
|
||||
len = MIN(9, setup->wLength);
|
||||
buf = (uint8_t *)g_hidiap_usb_desc;
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
usbd_ctrl_unsupport(pudev);
|
||||
}
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
break;
|
||||
case USB_STD_REQ_GET_INTERFACE:
|
||||
usbd_ctrl_send(pudev, (uint8_t *)&piap->alt_setting, 1);
|
||||
|
||||
@@ -283,13 +283,18 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
|
||||
{
|
||||
len = MIN(USBD_KEYBOARD_SIZ_REPORT_DESC, setup->wLength);
|
||||
buf = (uint8_t *)g_usbd_keyboard_report;
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
}
|
||||
else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE)
|
||||
{
|
||||
len = MIN(9, setup->wLength);
|
||||
buf = (uint8_t *)g_keyboard_usb_desc;
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
usbd_ctrl_unsupport(pudev);
|
||||
}
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
break;
|
||||
case USB_STD_REQ_GET_INTERFACE:
|
||||
usbd_ctrl_send(pudev, (uint8_t *)&pkeyboard->alt_setting, 1);
|
||||
|
||||
@@ -147,13 +147,18 @@ static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
|
||||
{
|
||||
len = MIN(USBD_MOUSE_SIZ_REPORT_DESC, setup->wLength);
|
||||
buf = (uint8_t *)g_usbd_mouse_report;
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
}
|
||||
else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE)
|
||||
{
|
||||
len = MIN(9, setup->wLength);
|
||||
buf = (uint8_t *)g_mouse_usb_desc;
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
usbd_ctrl_unsupport(pudev);
|
||||
}
|
||||
usbd_ctrl_send(pudev, (uint8_t *)buf, len);
|
||||
break;
|
||||
case USB_STD_REQ_GET_INTERFACE:
|
||||
usbd_ctrl_send(pudev, (uint8_t *)&pmouse->alt_setting, 1);
|
||||
|
||||
412
middlewares/usbd_class/winusb/winusb_class.c
Normal file
412
middlewares/usbd_class/winusb/winusb_class.c
Normal file
@@ -0,0 +1,412 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file winusb_class.c
|
||||
* @brief usb winusb class type
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
* Artery authorizes customers to use, copy, and distribute the BSP
|
||||
* software and its related documentation for the purpose of design and
|
||||
* development in conjunction with Artery microcontrollers. Use of the
|
||||
* software is governed by this copyright notice and the following disclaimer.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
|
||||
* GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
|
||||
* TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
|
||||
* STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
|
||||
* INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
#include "usbd_core.h"
|
||||
#include "winusb_class.h"
|
||||
#include "winusb_desc.h"
|
||||
#include "string.h"
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
|
||||
/** @addtogroup AT32F415_middlewares_usbd_class
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup USB_winusb_class
|
||||
* @brief usb device class win usb
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup USB_winusb_class_private_functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
static usb_sts_type class_init_handler(void *udev);
|
||||
static usb_sts_type class_clear_handler(void *udev);
|
||||
static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup);
|
||||
static usb_sts_type class_ept0_tx_handler(void *udev);
|
||||
static usb_sts_type class_ept0_rx_handler(void *udev);
|
||||
static usb_sts_type class_in_handler(void *udev, uint8_t ept_num);
|
||||
static usb_sts_type class_out_handler(void *udev, uint8_t ept_num);
|
||||
static usb_sts_type class_sof_handler(void *udev);
|
||||
static usb_sts_type class_event_handler(void *udev, usbd_event_type event);
|
||||
#if (USBD_SUPPORT_WINUSB == 1)
|
||||
static usb_sts_type usbd_get_winusb_descriptor(usbd_core_type *udev);
|
||||
#endif
|
||||
static usb_sts_type winusb_struct_init(winusb_struct_type *p_winusb);
|
||||
|
||||
/* winusb data struct */
|
||||
winusb_struct_type winusb_struct;
|
||||
|
||||
/*winusb receive buffer define*/
|
||||
static uint32_t g_winusb_rx_buffer[16];
|
||||
|
||||
/* usb device class handler */
|
||||
usbd_class_handler winusb_class_handler =
|
||||
{
|
||||
class_init_handler,
|
||||
class_clear_handler,
|
||||
class_setup_handler,
|
||||
class_ept0_tx_handler,
|
||||
class_ept0_rx_handler,
|
||||
class_in_handler,
|
||||
class_out_handler,
|
||||
class_sof_handler,
|
||||
class_event_handler,
|
||||
&winusb_struct
|
||||
};
|
||||
/**
|
||||
* @brief initialize usb endpoint
|
||||
* @param udev: to the structure of usbd_core_type
|
||||
* @retval status of usb_sts_type
|
||||
*/
|
||||
static usb_sts_type class_init_handler(void *udev)
|
||||
{
|
||||
usb_sts_type status = USB_OK;
|
||||
usbd_core_type *pudev = (usbd_core_type *)udev;
|
||||
winusb_struct_type *p_winusb = (winusb_struct_type *)pudev->class_handler->pdata;
|
||||
|
||||
/* init winusb struct */
|
||||
winusb_struct_init(p_winusb);
|
||||
|
||||
p_winusb->maxpacket = USBD_FS_WINUSB_MAXPACKET_SIZE;
|
||||
|
||||
/* open out endpoint */
|
||||
usbd_ept_open(pudev, USBD_WINUSB_BULK_OUT_EPT, EPT_BULK_TYPE, USBD_WINUSB_OUT_MAXPACKET_SIZE);
|
||||
|
||||
/* open in endpoint */
|
||||
usbd_ept_open(pudev, USBD_WINUSB_BULK_IN_EPT, EPT_BULK_TYPE, USBD_WINUSB_IN_MAXPACKET_SIZE);
|
||||
|
||||
/* set out endpoint to receive status */
|
||||
usbd_ept_recv(pudev, USBD_WINUSB_BULK_OUT_EPT, p_winusb->g_rx_buff, USBD_WINUSB_OUT_MAXPACKET_SIZE);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief clear endpoint or other state
|
||||
* @param udev: to the structure of usbd_core_type
|
||||
* @retval status of usb_sts_type
|
||||
*/
|
||||
static usb_sts_type class_clear_handler(void *udev)
|
||||
{
|
||||
usb_sts_type status = USB_OK;
|
||||
usbd_core_type *pudev = (usbd_core_type *)udev;
|
||||
|
||||
/* close in endpoint */
|
||||
usbd_ept_close(pudev, USBD_WINUSB_BULK_IN_EPT);
|
||||
|
||||
/* close out endpoint */
|
||||
usbd_ept_close(pudev, USBD_WINUSB_BULK_OUT_EPT);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief usb device class setup request handler
|
||||
* @param udev: to the structure of usbd_core_type
|
||||
* @param setup: setup packet
|
||||
* @retval status of usb_sts_type
|
||||
*/
|
||||
static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup)
|
||||
{
|
||||
usb_sts_type status = USB_OK;
|
||||
usbd_core_type *pudev = (usbd_core_type *)udev;
|
||||
winusb_struct_type *p_winusb = (winusb_struct_type *)pudev->class_handler->pdata;
|
||||
|
||||
switch(setup->bmRequestType & USB_REQ_TYPE_RESERVED)
|
||||
{
|
||||
/* class request */
|
||||
case USB_REQ_TYPE_CLASS:
|
||||
usbd_ctrl_unsupport(pudev);
|
||||
break;
|
||||
/* standard request */
|
||||
case USB_REQ_TYPE_STANDARD:
|
||||
switch(setup->bRequest)
|
||||
{
|
||||
case USB_STD_REQ_GET_DESCRIPTOR:
|
||||
usbd_ctrl_unsupport(pudev);
|
||||
break;
|
||||
case USB_STD_REQ_GET_INTERFACE:
|
||||
usbd_ctrl_send(pudev, (uint8_t *)&p_winusb->alt_setting, 1);
|
||||
break;
|
||||
case USB_STD_REQ_SET_INTERFACE:
|
||||
p_winusb->alt_setting = setup->wValue;
|
||||
break;
|
||||
case USB_STD_REQ_CLEAR_FEATURE:
|
||||
break;
|
||||
case USB_STD_REQ_SET_FEATURE:
|
||||
break;
|
||||
default:
|
||||
usbd_ctrl_unsupport(pudev);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#if (USBD_SUPPORT_WINUSB == 1)
|
||||
case USB_REQ_TYPE_VENDOR:
|
||||
if(setup->bRequest == WINUSB_BMS_VENDOR_CODE)
|
||||
{
|
||||
usbd_get_winusb_descriptor(pudev);
|
||||
}
|
||||
else
|
||||
{
|
||||
usbd_ctrl_unsupport(pudev);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
usbd_ctrl_unsupport(pudev);
|
||||
break;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
#if (USBD_SUPPORT_WINUSB == 1)
|
||||
static usb_sts_type usbd_get_winusb_descriptor(usbd_core_type *udev)
|
||||
{
|
||||
usb_sts_type ret = USB_OK;
|
||||
uint16_t len = 0;
|
||||
usbd_desc_t *desc = NULL;
|
||||
uint8_t desc_type = udev->setup.wIndex;
|
||||
|
||||
switch(desc_type)
|
||||
{
|
||||
case USB_WINUSB_COMPAT_ID:
|
||||
desc = udev->desc_handler->get_device_winusb_os_feature();
|
||||
break;
|
||||
case USB_WINUSB_PROPERTIES_ID:
|
||||
desc = udev->desc_handler->get_device_winusb_os_property();
|
||||
break;
|
||||
default:
|
||||
usbd_ctrl_unsupport(udev);
|
||||
return ret;
|
||||
}
|
||||
if(desc != NULL)
|
||||
{
|
||||
if((desc->length != 0) && (udev->setup.wLength != 0))
|
||||
{
|
||||
len = MIN(desc->length , udev->setup.wLength);
|
||||
usbd_ctrl_send(udev, desc->descriptor, len);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief usb device endpoint 0 in status stage complete
|
||||
* @param udev: to the structure of usbd_core_type
|
||||
* @retval status of usb_sts_type
|
||||
*/
|
||||
static usb_sts_type class_ept0_tx_handler(void *udev)
|
||||
{
|
||||
usb_sts_type status = USB_OK;
|
||||
|
||||
/* ...user code... */
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief usb device endpoint 0 out status stage complete
|
||||
* @param udev: usb device core handler type
|
||||
* @retval status of usb_sts_type
|
||||
*/
|
||||
static usb_sts_type class_ept0_rx_handler(void *udev)
|
||||
{
|
||||
usb_sts_type status = USB_OK;
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief usb device transmision complete handler
|
||||
* @param udev: to the structure of usbd_core_type
|
||||
* @param ept_num: endpoint number
|
||||
* @retval status of usb_sts_type
|
||||
*/
|
||||
static usb_sts_type class_in_handler(void *udev, uint8_t ept_num)
|
||||
{
|
||||
usbd_core_type *pudev = (usbd_core_type *)udev;
|
||||
winusb_struct_type *p_winusb = (winusb_struct_type *)pudev->class_handler->pdata;
|
||||
usb_sts_type status = USB_OK;
|
||||
|
||||
/* ...user code...
|
||||
trans next packet data
|
||||
*/
|
||||
usbd_flush_tx_fifo(pudev, ept_num);
|
||||
p_winusb->g_tx_completed = 1;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief usb device endpoint receive data
|
||||
* @param udev: to the structure of usbd_core_type
|
||||
* @param ept_num: endpoint number
|
||||
* @retval status of usb_sts_type
|
||||
*/
|
||||
static usb_sts_type class_out_handler(void *udev, uint8_t ept_num)
|
||||
{
|
||||
usb_sts_type status = USB_OK;
|
||||
usbd_core_type *pudev = (usbd_core_type *)udev;
|
||||
winusb_struct_type *p_winusb = (winusb_struct_type *)pudev->class_handler->pdata;
|
||||
|
||||
/* get endpoint receive data length */
|
||||
p_winusb->g_rxlen = usbd_get_recv_len(pudev, ept_num);
|
||||
|
||||
/*set recv flag*/
|
||||
p_winusb->g_rx_completed = 1;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief usb device sof handler
|
||||
* @param udev: to the structure of usbd_core_type
|
||||
* @retval status of usb_sts_type
|
||||
*/
|
||||
static usb_sts_type class_sof_handler(void *udev)
|
||||
{
|
||||
usb_sts_type status = USB_OK;
|
||||
|
||||
/* ...user code... */
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief usb device event handler
|
||||
* @param udev: to the structure of usbd_core_type
|
||||
* @param event: usb device event
|
||||
* @retval status of usb_sts_type
|
||||
*/
|
||||
static usb_sts_type class_event_handler(void *udev, usbd_event_type event)
|
||||
{
|
||||
usb_sts_type status = USB_OK;
|
||||
switch(event)
|
||||
{
|
||||
case USBD_RESET_EVENT:
|
||||
|
||||
/* ...user code... */
|
||||
|
||||
break;
|
||||
case USBD_SUSPEND_EVENT:
|
||||
|
||||
/* ...user code... */
|
||||
|
||||
break;
|
||||
case USBD_WAKEUP_EVENT:
|
||||
/* ...user code... */
|
||||
|
||||
break;
|
||||
case USBD_INISOINCOM_EVENT:
|
||||
break;
|
||||
case USBD_OUTISOINCOM_EVENT:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief usb device winusb init
|
||||
* @param p_winusb: to the structure of winusb_struct
|
||||
* @retval status of usb_sts_type
|
||||
*/
|
||||
static usb_sts_type winusb_struct_init(winusb_struct_type *p_winusb)
|
||||
{
|
||||
p_winusb->g_tx_completed = 1;
|
||||
p_winusb->g_rx_completed = 0;
|
||||
p_winusb->alt_setting = 0;
|
||||
p_winusb->g_rx_buff = (uint8_t *)g_winusb_rx_buffer;
|
||||
return USB_OK;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief usb device class rx data process
|
||||
* @param udev: to the structure of usbd_core_type
|
||||
* @param recv_data: receive buffer
|
||||
* @retval receive data len
|
||||
*/
|
||||
uint16_t usb_winusb_get_rxdata(void *udev, uint8_t *recv_data)
|
||||
{
|
||||
uint16_t i_index = 0;
|
||||
uint16_t tmp_len = 0;
|
||||
usbd_core_type *pudev = (usbd_core_type *)udev;
|
||||
winusb_struct_type *p_winusb = (winusb_struct_type *)pudev->class_handler->pdata;
|
||||
|
||||
if(p_winusb->g_rx_completed == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
p_winusb->g_rx_completed = 0;
|
||||
tmp_len = p_winusb->g_rxlen;
|
||||
for(i_index = 0; i_index < p_winusb->g_rxlen; i_index ++)
|
||||
{
|
||||
recv_data[i_index] = p_winusb->g_rx_buff[i_index];
|
||||
}
|
||||
|
||||
usbd_ept_recv(pudev, USBD_WINUSB_BULK_OUT_EPT, p_winusb->g_rx_buff, p_winusb->maxpacket);
|
||||
|
||||
return tmp_len;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief usb device class send data
|
||||
* @param udev: to the structure of usbd_core_type
|
||||
* @param send_data: send data buffer
|
||||
* @param len: send length
|
||||
* @retval error status
|
||||
*/
|
||||
error_status usb_winusb_send_data(void *udev, uint8_t *send_data, uint16_t len)
|
||||
{
|
||||
error_status status = SUCCESS;
|
||||
usbd_core_type *pudev = (usbd_core_type *)udev;
|
||||
winusb_struct_type *p_winusb = (winusb_struct_type *)pudev->class_handler->pdata;
|
||||
if(p_winusb->g_tx_completed)
|
||||
{
|
||||
p_winusb->g_tx_completed = 0;
|
||||
usbd_ept_send(pudev, USBD_WINUSB_BULK_IN_EPT, send_data, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
status = ERROR;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
115
middlewares/usbd_class/winusb/winusb_class.h
Normal file
115
middlewares/usbd_class/winusb/winusb_class.h
Normal file
@@ -0,0 +1,115 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file winusb_class.h
|
||||
* @brief usb winusb class file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
* Artery authorizes customers to use, copy, and distribute the BSP
|
||||
* software and its related documentation for the purpose of design and
|
||||
* development in conjunction with Artery microcontrollers. Use of the
|
||||
* software is governed by this copyright notice and the following disclaimer.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
|
||||
* GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
|
||||
* TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
|
||||
* STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
|
||||
* INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
|
||||
/* define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __WINUSB_CLASS_H
|
||||
#define __WINUSB_CLASS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "usb_std.h"
|
||||
#include "usbd_core.h"
|
||||
|
||||
/** @addtogroup AT32F415_middlewares_usbd_class
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup USB_winusb_class
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup USB_winusb_class_definition
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief usb use endpoint define
|
||||
*/
|
||||
#define USBD_WINUSB_BULK_IN_EPT 0x81
|
||||
#define USBD_WINUSB_BULK_OUT_EPT 0x01
|
||||
|
||||
/**
|
||||
* @brief usb in and out max packet size define
|
||||
*/
|
||||
|
||||
#define USBD_FS_WINUSB_MAXPACKET_SIZE 0x40
|
||||
#define USBD_WINUSB_IN_MAXPACKET_SIZE USBD_FS_WINUSB_MAXPACKET_SIZE
|
||||
#define USBD_WINUSB_OUT_MAXPACKET_SIZE USBD_FS_WINUSB_MAXPACKET_SIZE
|
||||
|
||||
#define WINUSB_BMS_VENDOR_CODE 0xA0
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup USB_winusb_class_exported_types
|
||||
* @{
|
||||
*/
|
||||
|
||||
/**
|
||||
* @brief usb winusb class struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
uint32_t alt_setting;
|
||||
uint8_t *g_rx_buff;
|
||||
uint16_t g_len, g_rxlen;
|
||||
__IO uint8_t g_tx_completed, g_rx_completed;
|
||||
uint32_t maxpacket;
|
||||
}winusb_struct_type;
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/** @defgroup USB_winusb_class_exported_functions
|
||||
* @{
|
||||
*/
|
||||
extern usbd_class_handler winusb_class_handler;
|
||||
uint16_t usb_winusb_get_rxdata(void *udev, uint8_t *recv_data);
|
||||
error_status usb_winusb_send_data(void *udev, uint8_t *send_data, uint16_t len);
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
527
middlewares/usbd_class/winusb/winusb_desc.c
Normal file
527
middlewares/usbd_class/winusb/winusb_desc.c
Normal file
@@ -0,0 +1,527 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file winusb_desc.c
|
||||
* @brief usb winusb device descriptor
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
* Artery authorizes customers to use, copy, and distribute the BSP
|
||||
* software and its related documentation for the purpose of design and
|
||||
* development in conjunction with Artery microcontrollers. Use of the
|
||||
* software is governed by this copyright notice and the following disclaimer.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
|
||||
* GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
|
||||
* TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
|
||||
* STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
|
||||
* INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
#include "stdio.h"
|
||||
#include "usb_std.h"
|
||||
#include "usbd_sdr.h"
|
||||
#include "usbd_core.h"
|
||||
#include "winusb_desc.h"
|
||||
|
||||
/** @addtogroup AT32F415_middlewares_usbd_class
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup USB_winusb_desc
|
||||
* @brief usb device winusb descriptor
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup USB_winusb_desc_private_functions
|
||||
* @{
|
||||
*/
|
||||
|
||||
static usbd_desc_t *get_device_descriptor(void);
|
||||
static usbd_desc_t *get_device_qualifier(void);
|
||||
static usbd_desc_t *get_device_configuration(void);
|
||||
static usbd_desc_t *get_device_other_speed(void);
|
||||
static usbd_desc_t *get_device_lang_id(void);
|
||||
static usbd_desc_t *get_device_manufacturer_string(void);
|
||||
static usbd_desc_t *get_device_product_string(void);
|
||||
static usbd_desc_t *get_device_serial_string(void);
|
||||
static usbd_desc_t *get_device_interface_string(void);
|
||||
static usbd_desc_t *get_device_config_string(void);
|
||||
|
||||
static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf);
|
||||
static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len);
|
||||
static void get_serial_num(void);
|
||||
|
||||
#if (USBD_SUPPORT_WINUSB == 1)
|
||||
static usbd_desc_t *get_device_winusb_os_string(void);
|
||||
static usbd_desc_t *get_device_winusb_os_feature(void);
|
||||
static usbd_desc_t *get_device_winusb_os_property(void);
|
||||
#endif
|
||||
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD static uint8_t g_usbd_desc_buffer[256] ALIGNED_TAIL;
|
||||
|
||||
/**
|
||||
* @brief device descriptor handler structure
|
||||
*/
|
||||
usbd_desc_handler winusb_desc_handler =
|
||||
{
|
||||
get_device_descriptor,
|
||||
get_device_qualifier,
|
||||
get_device_configuration,
|
||||
get_device_other_speed,
|
||||
get_device_lang_id,
|
||||
get_device_manufacturer_string,
|
||||
get_device_product_string,
|
||||
get_device_serial_string,
|
||||
get_device_interface_string,
|
||||
get_device_config_string,
|
||||
#if (USBD_SUPPORT_WINUSB == 1)
|
||||
get_device_winusb_os_string,
|
||||
get_device_winusb_os_feature,
|
||||
get_device_winusb_os_property
|
||||
#endif
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief usb device standard descriptor
|
||||
*/
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD static uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL =
|
||||
{
|
||||
USB_DEVICE_DESC_LEN, /* bLength */
|
||||
USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */
|
||||
0x00, /* bcdUSB */
|
||||
0x02,
|
||||
0x00, /* bDeviceClass */
|
||||
0x00, /* bDeviceSubClass */
|
||||
0x00, /* bDeviceProtocol */
|
||||
USB_MAX_EP0_SIZE, /* bMaxPacketSize */
|
||||
LBYTE(USBD_WINUSB_VENDOR_ID), /* idVendor */
|
||||
HBYTE(USBD_WINUSB_VENDOR_ID), /* idVendor */
|
||||
LBYTE(USBD_WINUSB_PRODUCT_ID), /* idProduct */
|
||||
HBYTE(USBD_WINUSB_PRODUCT_ID), /* idProduct */
|
||||
0x00, /* bcdDevice rel. 2.00 */
|
||||
0x02,
|
||||
USB_MFC_STRING, /* Index of manufacturer string */
|
||||
USB_PRODUCT_STRING, /* Index of product string */
|
||||
USB_SERIAL_STRING, /* Index of serial number string */
|
||||
1 /* bNumConfigurations */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief usb configuration standard descriptor
|
||||
*/
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_WINUSB_CONFIG_DESC_SIZE] ALIGNED_TAIL =
|
||||
{
|
||||
USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */
|
||||
USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */
|
||||
LBYTE(USBD_WINUSB_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */
|
||||
HBYTE(USBD_WINUSB_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */
|
||||
0x01, /* bNumInterfaces: 1 interface */
|
||||
0x01, /* bConfigurationValue: configuration value */
|
||||
0x00, /* iConfiguration: index of string descriptor describing
|
||||
the configuration */
|
||||
0xC0, /* bmAttributes: self powered */
|
||||
0x32, /* MaxPower 100 mA: this current is used for detecting vbus */
|
||||
|
||||
USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */
|
||||
USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */
|
||||
0x00, /* bInterfaceNumber: number of interface */
|
||||
0x00, /* bAlternateSetting: alternate set */
|
||||
0x02, /* bNumEndpoints: number of endpoints */
|
||||
0xff, /* bInterfaceClass: Vendor specific*/
|
||||
0x00, /* bInterfaceSubClass: subclass code */
|
||||
0x00, /* bInterfaceProtocol: protocol code */
|
||||
0x00, /* iInterface: index of string descriptor */
|
||||
|
||||
USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */
|
||||
USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */
|
||||
USBD_WINUSB_BULK_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */
|
||||
USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */
|
||||
LBYTE(USBD_WINUSB_OUT_MAXPACKET_SIZE),
|
||||
HBYTE(USBD_WINUSB_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */
|
||||
0x00, /* bInterval: interval for polling endpoint for data transfers */
|
||||
|
||||
USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */
|
||||
USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */
|
||||
USBD_WINUSB_BULK_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */
|
||||
USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */
|
||||
LBYTE(USBD_WINUSB_IN_MAXPACKET_SIZE),
|
||||
HBYTE(USBD_WINUSB_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */
|
||||
0x00, /* bInterval: interval for polling endpoint for data transfers */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief usb string lang id
|
||||
*/
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD static uint8_t g_string_lang_id[USBD_WINUSB_SIZ_STRING_LANGID] ALIGNED_TAIL =
|
||||
{
|
||||
USBD_WINUSB_SIZ_STRING_LANGID,
|
||||
USB_DESCIPTOR_TYPE_STRING,
|
||||
0x09,
|
||||
0x04,
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief usb string serial
|
||||
*/
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD static uint8_t g_string_serial[USBD_WINUSB_SIZ_STRING_SERIAL] ALIGNED_TAIL =
|
||||
{
|
||||
USBD_WINUSB_SIZ_STRING_SERIAL,
|
||||
USB_DESCIPTOR_TYPE_STRING,
|
||||
};
|
||||
|
||||
|
||||
/* device descriptor */
|
||||
static usbd_desc_t device_descriptor =
|
||||
{
|
||||
USB_DEVICE_DESC_LEN,
|
||||
g_usbd_descriptor
|
||||
};
|
||||
|
||||
/* config descriptor */
|
||||
static usbd_desc_t config_descriptor =
|
||||
{
|
||||
USBD_WINUSB_CONFIG_DESC_SIZE,
|
||||
g_usbd_configuration
|
||||
};
|
||||
|
||||
/* langid descriptor */
|
||||
static usbd_desc_t langid_descriptor =
|
||||
{
|
||||
USBD_WINUSB_SIZ_STRING_LANGID,
|
||||
g_string_lang_id
|
||||
};
|
||||
|
||||
/* serial descriptor */
|
||||
static usbd_desc_t serial_descriptor =
|
||||
{
|
||||
USBD_WINUSB_SIZ_STRING_SERIAL,
|
||||
g_string_serial
|
||||
};
|
||||
|
||||
static usbd_desc_t vp_desc;
|
||||
|
||||
/**
|
||||
* @brief standard usb unicode convert
|
||||
* @param string: source string
|
||||
* @param unicode_buf: unicode buffer
|
||||
* @retval length
|
||||
*/
|
||||
static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf)
|
||||
{
|
||||
uint16_t str_len = 0, id_pos = 2;
|
||||
uint8_t *tmp_str = string;
|
||||
|
||||
while(*tmp_str != '\0')
|
||||
{
|
||||
str_len ++;
|
||||
unicode_buf[id_pos ++] = *tmp_str ++;
|
||||
unicode_buf[id_pos ++] = 0x00;
|
||||
}
|
||||
|
||||
str_len = str_len * 2 + 2;
|
||||
unicode_buf[0] = (uint8_t)str_len;
|
||||
unicode_buf[1] = USB_DESCIPTOR_TYPE_STRING;
|
||||
|
||||
return str_len;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief usb int convert to unicode
|
||||
* @param value: int value
|
||||
* @param pbus: unicode buffer
|
||||
* @param len: length
|
||||
* @retval none
|
||||
*/
|
||||
static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len)
|
||||
{
|
||||
uint8_t idx = 0;
|
||||
|
||||
for( idx = 0 ; idx < len ; idx ++)
|
||||
{
|
||||
if( ((value >> 28)) < 0xA )
|
||||
{
|
||||
pbuf[ 2 * idx] = (value >> 28) + '0';
|
||||
}
|
||||
else
|
||||
{
|
||||
pbuf[2 * idx] = (value >> 28) + 'A' - 10;
|
||||
}
|
||||
|
||||
value = value << 4;
|
||||
|
||||
pbuf[2 * idx + 1] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief usb get serial number
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
static void get_serial_num(void)
|
||||
{
|
||||
uint32_t serial0, serial1, serial2;
|
||||
|
||||
serial0 = *(uint32_t*)MCU_ID1;
|
||||
serial1 = *(uint32_t*)MCU_ID2;
|
||||
serial2 = *(uint32_t*)MCU_ID3;
|
||||
|
||||
serial0 += serial2;
|
||||
|
||||
if (serial0 != 0)
|
||||
{
|
||||
usbd_int_to_unicode (serial0, &g_string_serial[2] ,8);
|
||||
usbd_int_to_unicode (serial1, &g_string_serial[18] ,4);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get device descriptor
|
||||
* @param none
|
||||
* @retval usbd_desc
|
||||
*/
|
||||
static usbd_desc_t *get_device_descriptor(void)
|
||||
{
|
||||
return &device_descriptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get device qualifier
|
||||
* @param none
|
||||
* @retval usbd_desc
|
||||
*/
|
||||
static usbd_desc_t * get_device_qualifier(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get config descriptor
|
||||
* @param none
|
||||
* @retval usbd_desc
|
||||
*/
|
||||
static usbd_desc_t *get_device_configuration(void)
|
||||
{
|
||||
return &config_descriptor;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief get other speed descriptor
|
||||
* @param none
|
||||
* @retval usbd_desc
|
||||
*/
|
||||
static usbd_desc_t *get_device_other_speed(void)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get lang id descriptor
|
||||
* @param none
|
||||
* @retval usbd_desc
|
||||
*/
|
||||
static usbd_desc_t *get_device_lang_id(void)
|
||||
{
|
||||
return &langid_descriptor;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief get manufacturer descriptor
|
||||
* @param none
|
||||
* @retval usbd_desc
|
||||
*/
|
||||
static usbd_desc_t *get_device_manufacturer_string(void)
|
||||
{
|
||||
vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_WINUSB_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer);
|
||||
vp_desc.descriptor = g_usbd_desc_buffer;
|
||||
return &vp_desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get product descriptor
|
||||
* @param none
|
||||
* @retval usbd_desc
|
||||
*/
|
||||
static usbd_desc_t *get_device_product_string(void)
|
||||
{
|
||||
vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_WINUSB_DESC_PRODUCT_STRING, g_usbd_desc_buffer);
|
||||
vp_desc.descriptor = g_usbd_desc_buffer;
|
||||
return &vp_desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get serial descriptor
|
||||
* @param none
|
||||
* @retval usbd_desc
|
||||
*/
|
||||
static usbd_desc_t *get_device_serial_string(void)
|
||||
{
|
||||
get_serial_num();
|
||||
return &serial_descriptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get interface descriptor
|
||||
* @param none
|
||||
* @retval usbd_desc
|
||||
*/
|
||||
static usbd_desc_t *get_device_interface_string(void)
|
||||
{
|
||||
vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_WINUSB_DESC_INTERFACE_STRING, g_usbd_desc_buffer);
|
||||
vp_desc.descriptor = g_usbd_desc_buffer;
|
||||
return &vp_desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get device config descriptor
|
||||
* @param none
|
||||
* @retval usbd_desc
|
||||
*/
|
||||
static usbd_desc_t *get_device_config_string(void)
|
||||
{
|
||||
vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_WINUSB_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer);
|
||||
vp_desc.descriptor = g_usbd_desc_buffer;
|
||||
return &vp_desc;
|
||||
}
|
||||
|
||||
#if (USBD_SUPPORT_WINUSB == 1)
|
||||
|
||||
#define USB_LEN_OS_FEATURE_DESC 0x28
|
||||
#define USB_LEN_OS_PROPERTY_DESC 0x8E
|
||||
|
||||
/* os string descriptor fields */
|
||||
const uint8_t winusb_os_string[8] = {
|
||||
'M','S','F','T','1','0','0',
|
||||
WINUSB_BMS_VENDOR_CODE,
|
||||
};
|
||||
|
||||
#define U32TO8C(v) ((v & 0xFF), ((v >> 8) & 0xFF), ((v >> 16) & 0xFF), ((v >> 24) & 0xFF))
|
||||
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD static uint8_t g_usbd_winusb_os_feature[USB_LEN_OS_FEATURE_DESC] ALIGNED_TAIL =
|
||||
{
|
||||
USB_LEN_OS_FEATURE_DESC, 0x00, 0x00, 0x00, /*dwlength: 4 byte*/
|
||||
0x00, 0x01, /* bcd version 1.0 */
|
||||
0x04, 0x00, /* windex: extended compat ID descritor*/
|
||||
0x01, /* bcount the number of custom property sections */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* reserved */
|
||||
/* function section */
|
||||
0x00, /* first interface number */
|
||||
0x00, /* reserved */
|
||||
'W', 'I', 'N', 'U', 'S', 'B', 0x00, 0x00, /* 8 byte: the function compatible id */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,/* 8 byte: the function subcompatible id */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* reserved 6 bytes */
|
||||
};
|
||||
|
||||
#if defined ( __ICCARM__ ) /* iar compiler */
|
||||
#pragma data_alignment=4
|
||||
#endif
|
||||
ALIGNED_HEAD static uint8_t g_usbd_winusb_os_property[USB_LEN_OS_PROPERTY_DESC] ALIGNED_TAIL =
|
||||
{
|
||||
USB_LEN_OS_PROPERTY_DESC, 0x00, 0x00, 0x00,/* dwlength: 4 byte*/
|
||||
0x00, 0x01, /* bcd version 1.0 */
|
||||
0x05, 0x00, /* property descriptor index(5) */
|
||||
0x01, 0x00, /* wcount: number of section (1) */
|
||||
|
||||
/* custom property section */
|
||||
0x84, 0x00, 0x00, 0x00, /* dwsize: size of property section */
|
||||
0x01, 0x00, 0x00, 0x00, /* property data type */
|
||||
0x28, 0x00, /* property name length */
|
||||
/* property name: DeviceinterfaceGUID */
|
||||
'D', 0x00, 'e', 0x00, 'v', 0x00, 'i', 0x00, 'c', 0x00, 'e', 0x00,
|
||||
'I', 0x00, 'n', 0x00, 't', 0x00, 'e', 0x00, 'r', 0x00, 'f', 0x00,
|
||||
'a', 0x00, 'c', 0x00, 'e', 0x00, 'G', 0x00, 'U', 0x00, 'I', 0x00,
|
||||
'D', 0x00, 0x00, 0x00,
|
||||
|
||||
0x4E, 0x00, 0x00, 0x00, /* property data length */
|
||||
/*property data: {13eb360b-bc1e-46cb-ac8b-ef3da47b4062} */
|
||||
'{', 0x00, '1', 0x00, '3', 0x00, 'E', 0x00, 'B', 0x00, '3', 0x00,
|
||||
'6', 0x00, '0', 0x00, 'B', 0x00, '-', 0x00, 'B', 0x00, 'C', 0x00,
|
||||
'1', 0x00, 'E', 0x00, '-', 0x00, '4', 0x00, '6', 0x00, 'C', 0x00,
|
||||
'B', 0x00, '-', 0x00, 'A', 0x00, 'C', 0x00, '8', 0x00, 'B', 0x00,
|
||||
'-', 0x00, 'E', 0x00, 'F', 0x00, '3', 0x00, 'D', 0x00, 'A', 0x00,
|
||||
'4', 0x00, '7', 0x00, 'B', 0x00, '4', 0x00, '0', 0x00, '6', 0x00,
|
||||
'2', 0x00, '}', 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
static usbd_desc_t winusb_os_feature_descriptor =
|
||||
{
|
||||
USB_LEN_OS_FEATURE_DESC,
|
||||
g_usbd_winusb_os_feature
|
||||
};
|
||||
|
||||
static usbd_desc_t winusb_os_property_descriptor =
|
||||
{
|
||||
USB_LEN_OS_PROPERTY_DESC,
|
||||
g_usbd_winusb_os_property
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief get winusb os sring
|
||||
* @param none
|
||||
* @retval usbd_desc
|
||||
*/
|
||||
static usbd_desc_t *get_device_winusb_os_string(void)
|
||||
{
|
||||
vp_desc.length = usbd_unicode_convert((uint8_t *)winusb_os_string, g_usbd_desc_buffer);
|
||||
vp_desc.descriptor = g_usbd_desc_buffer;
|
||||
return &vp_desc;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get winusb os feature
|
||||
* @param none
|
||||
* @retval usbd_desc
|
||||
*/
|
||||
static usbd_desc_t *get_device_winusb_os_feature(void)
|
||||
{
|
||||
return &winusb_os_feature_descriptor;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief get winusb os property
|
||||
* @param none
|
||||
* @retval usbd_desc
|
||||
*/
|
||||
static usbd_desc_t *get_device_winusb_os_property(void)
|
||||
{
|
||||
return &winusb_os_property_descriptor;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
92
middlewares/usbd_class/winusb/winusb_desc.h
Normal file
92
middlewares/usbd_class/winusb/winusb_desc.h
Normal file
@@ -0,0 +1,92 @@
|
||||
/**
|
||||
**************************************************************************
|
||||
* @file winusb_desc.h
|
||||
* @brief usb winusb descriptor header file
|
||||
**************************************************************************
|
||||
* Copyright notice & Disclaimer
|
||||
*
|
||||
* The software Board Support Package (BSP) that is made available to
|
||||
* download from Artery official website is the copyrighted work of Artery.
|
||||
* Artery authorizes customers to use, copy, and distribute the BSP
|
||||
* software and its related documentation for the purpose of design and
|
||||
* development in conjunction with Artery microcontrollers. Use of the
|
||||
* software is governed by this copyright notice and the following disclaimer.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES,
|
||||
* GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS,
|
||||
* TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR
|
||||
* STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS,
|
||||
* INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.
|
||||
*
|
||||
**************************************************************************
|
||||
*/
|
||||
|
||||
/* define to prevent recursive inclusion -------------------------------------*/
|
||||
#ifndef __WINUSB_DESC_H
|
||||
#define __WINUSB_DESC_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "winusb_class.h"
|
||||
#include "usbd_core.h"
|
||||
|
||||
/** @addtogroup AT32F415_middlewares_usbd_class
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @addtogroup USB_winusb_desc
|
||||
* @{
|
||||
*/
|
||||
|
||||
/** @defgroup USB_winusb_desc_definition
|
||||
* @{
|
||||
*/
|
||||
/**
|
||||
* @brief usb vendor id and product id define
|
||||
*/
|
||||
#define USBD_WINUSB_VENDOR_ID 0x2E3C
|
||||
#define USBD_WINUSB_PRODUCT_ID 0x5780
|
||||
|
||||
/**
|
||||
* @brief usb descriptor size define
|
||||
*/
|
||||
#define USBD_WINUSB_CONFIG_DESC_SIZE 32
|
||||
#define USBD_WINUSB_SIZ_STRING_LANGID 4
|
||||
#define USBD_WINUSB_SIZ_STRING_SERIAL 0x1A
|
||||
|
||||
/**
|
||||
* @brief usb string define(vendor, product configuration, interface)
|
||||
*/
|
||||
#define USBD_WINUSB_DESC_MANUFACTURER_STRING "Artery"
|
||||
#define USBD_WINUSB_DESC_PRODUCT_STRING "AT32 WinUSB"
|
||||
#define USBD_WINUSB_DESC_CONFIGURATION_STRING "WinUSB Config"
|
||||
#define USBD_WINUSB_DESC_INTERFACE_STRING "WinUSB Interface"
|
||||
|
||||
/**
|
||||
* @brief usb mcu id address deine
|
||||
*/
|
||||
#define MCU_ID1 (0x1FFFF7E8)
|
||||
#define MCU_ID2 (0x1FFFF7EC)
|
||||
#define MCU_ID3 (0x1FFFF7F0)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
extern usbd_desc_handler winusb_desc_handler;
|
||||
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -290,7 +290,7 @@ static usb_sts_type set_linecoding(usbh_core_type *uhost, cdc_line_coding_type *
|
||||
uhost->ctrl.setup.wLength = LINE_CODING_STRUCTURE_SIZE;
|
||||
uhost->ctrl.setup.wIndex = 0;
|
||||
|
||||
status = usbh_ctrl_request(uhost, linecoding->array, LINE_CODING_STRUCTURE_SIZE);
|
||||
usbh_ctrl_request(uhost, linecoding->array, LINE_CODING_STRUCTURE_SIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -438,7 +438,7 @@ void cdc_start_transmission(usbh_core_type *uhost, uint8_t *data, uint32_t len)
|
||||
* @param uhost: to the structure of usbh_core_type
|
||||
* @retval status: usb_sts_type status
|
||||
*/
|
||||
__weak void cdc_transmit_complete(usbh_core_type *uhost)
|
||||
__WEAK void cdc_transmit_complete(usbh_core_type *uhost)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -512,7 +512,7 @@ void cdc_start_reception(usbh_core_type *uhost, uint8_t *data, uint32_t len)
|
||||
* @param uhost: to the structure of usbh_core_type
|
||||
* @retval status: usb_sts_type status
|
||||
*/
|
||||
__weak void cdc_receive_complete(usbh_core_type *uhost)
|
||||
__WEAK void cdc_receive_complete(usbh_core_type *uhost)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -259,8 +259,8 @@ extern usbh_class_handler_type uhost_cdc_class_handler;
|
||||
extern usbh_cdc_type usbh_cdc;
|
||||
void cdc_start_transmission(usbh_core_type *phost, uint8_t *data, uint32_t len);
|
||||
void cdc_start_reception(usbh_core_type *uhost, uint8_t *data, uint32_t len);
|
||||
__weak void cdc_transmit_complete(usbh_core_type *uhost);
|
||||
__weak void cdc_receive_complete(usbh_core_type *uhost);
|
||||
void cdc_transmit_complete(usbh_core_type *uhost);
|
||||
void cdc_receive_complete(usbh_core_type *uhost);
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>current_vref_value_check</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -327,8 +327,8 @@
|
||||
<uC99>0</uC99>
|
||||
<uGnu>0</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>3</v6Lang>
|
||||
<v6LangP>3</v6LangP>
|
||||
<v6Lang>1</v6Lang>
|
||||
<v6LangP>1</v6LangP>
|
||||
<vShortEn>1</vShortEn>
|
||||
<vShortWch>1</vShortWch>
|
||||
<v6Lto>0</v6Lto>
|
||||
@@ -483,11 +483,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>exint_trigger_partitioned</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -327,8 +327,8 @@
|
||||
<uC99>0</uC99>
|
||||
<uGnu>0</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>3</v6Lang>
|
||||
<v6LangP>3</v6LangP>
|
||||
<v6Lang>1</v6Lang>
|
||||
<v6LangP>1</v6LangP>
|
||||
<vShortEn>1</vShortEn>
|
||||
<vShortWch>1</vShortWch>
|
||||
<v6Lto>0</v6Lto>
|
||||
@@ -488,11 +488,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -142,7 +142,7 @@ void SysTick_Handler(void)
|
||||
*/
|
||||
void DMA1_Channel1_IRQHandler(void)
|
||||
{
|
||||
if(dma_flag_get(DMA1_FDT1_FLAG) != RESET)
|
||||
if(dma_interrupt_flag_get(DMA1_FDT1_FLAG) != RESET)
|
||||
{
|
||||
dma_flag_clear(DMA1_FDT1_FLAG);
|
||||
dma_trans_complete_flag = 1;
|
||||
@@ -156,7 +156,7 @@ void DMA1_Channel1_IRQHandler(void)
|
||||
*/
|
||||
void ADC1_IRQHandler(void)
|
||||
{
|
||||
if(adc_flag_get(ADC1, ADC_PCCE_FLAG) != RESET)
|
||||
if(adc_interrupt_flag_get(ADC1, ADC_PCCE_FLAG) != RESET)
|
||||
{
|
||||
adc_flag_clear(ADC1, ADC_PCCE_FLAG);
|
||||
if(preempt_trigger_count < 3)
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>internal_temperature_sensor</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -327,8 +327,8 @@
|
||||
<uC99>0</uC99>
|
||||
<uGnu>0</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>3</v6Lang>
|
||||
<v6LangP>3</v6LangP>
|
||||
<v6Lang>1</v6Lang>
|
||||
<v6LangP>1</v6LangP>
|
||||
<vShortEn>1</vShortEn>
|
||||
<vShortWch>1</vShortWch>
|
||||
<v6Lto>0</v6Lto>
|
||||
@@ -483,11 +483,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
|
||||
|
||||
#define ADC_VREF (3.3)
|
||||
#define ADC_TEMP_BASE (1.26)
|
||||
#define ADC_TEMP_SLOPE (-0.00423)
|
||||
#define ADC_TEMP_BASE (1.32)
|
||||
#define ADC_TEMP_SLOPE (-0.00434)
|
||||
|
||||
__IO uint16_t adc1_ordinary_value = 0;
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>repeat_conversion_loop_transfer</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -327,8 +327,8 @@
|
||||
<uC99>0</uC99>
|
||||
<uGnu>0</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>3</v6Lang>
|
||||
<v6LangP>3</v6LangP>
|
||||
<v6Lang>1</v6Lang>
|
||||
<v6LangP>1</v6LangP>
|
||||
<vShortEn>1</vShortEn>
|
||||
<vShortWch>1</vShortWch>
|
||||
<v6Lto>0</v6Lto>
|
||||
@@ -483,11 +483,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -140,7 +140,7 @@ void SysTick_Handler(void)
|
||||
*/
|
||||
void DMA1_Channel1_IRQHandler(void)
|
||||
{
|
||||
if(dma_flag_get(DMA1_FDT1_FLAG) != RESET)
|
||||
if(dma_interrupt_flag_get(DMA1_FDT1_FLAG) != RESET)
|
||||
{
|
||||
dma_flag_clear(DMA1_FDT1_FLAG);
|
||||
dma_trans_complete_flag++;
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>software_trigger_repeat</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -327,8 +327,8 @@
|
||||
<uC99>0</uC99>
|
||||
<uGnu>0</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>3</v6Lang>
|
||||
<v6LangP>3</v6LangP>
|
||||
<v6Lang>1</v6Lang>
|
||||
<v6LangP>1</v6LangP>
|
||||
<vShortEn>1</vShortEn>
|
||||
<vShortWch>1</vShortWch>
|
||||
<v6Lto>0</v6Lto>
|
||||
@@ -483,11 +483,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -140,7 +140,7 @@ void SysTick_Handler(void)
|
||||
*/
|
||||
void DMA1_Channel1_IRQHandler(void)
|
||||
{
|
||||
if(dma_flag_get(DMA1_FDT1_FLAG) != RESET)
|
||||
if(dma_interrupt_flag_get(DMA1_FDT1_FLAG) != RESET)
|
||||
{
|
||||
dma_flag_clear(DMA1_FDT1_FLAG);
|
||||
dma_trans_complete_flag++;
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>tmr_trigger_automatic_preempted</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -327,8 +327,8 @@
|
||||
<uC99>0</uC99>
|
||||
<uGnu>0</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>3</v6Lang>
|
||||
<v6LangP>3</v6LangP>
|
||||
<v6Lang>1</v6Lang>
|
||||
<v6LangP>1</v6LangP>
|
||||
<vShortEn>1</vShortEn>
|
||||
<vShortWch>1</vShortWch>
|
||||
<v6Lto>0</v6Lto>
|
||||
@@ -488,11 +488,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -143,7 +143,7 @@ void SysTick_Handler(void)
|
||||
*/
|
||||
void DMA1_Channel1_IRQHandler(void)
|
||||
{
|
||||
if(dma_flag_get(DMA1_FDT1_FLAG) != RESET)
|
||||
if(dma_interrupt_flag_get(DMA1_FDT1_FLAG) != RESET)
|
||||
{
|
||||
dma_flag_clear(DMA1_FDT1_FLAG);
|
||||
dma_trans_complete_flag = 1;
|
||||
@@ -157,7 +157,7 @@ void DMA1_Channel1_IRQHandler(void)
|
||||
*/
|
||||
void ADC1_IRQHandler(void)
|
||||
{
|
||||
if(adc_flag_get(ADC1, ADC_PCCE_FLAG) != RESET)
|
||||
if(adc_interrupt_flag_get(ADC1, ADC_PCCE_FLAG) != RESET)
|
||||
{
|
||||
adc_flag_clear(ADC1, ADC_PCCE_FLAG);
|
||||
if(preempt_conversion_count < 5)
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>voltage_monitoring</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -327,8 +327,8 @@
|
||||
<uC99>0</uC99>
|
||||
<uGnu>0</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>3</v6Lang>
|
||||
<v6LangP>3</v6LangP>
|
||||
<v6Lang>1</v6Lang>
|
||||
<v6LangP>1</v6LangP>
|
||||
<vShortEn>1</vShortEn>
|
||||
<vShortWch>1</vShortWch>
|
||||
<v6Lto>0</v6Lto>
|
||||
@@ -483,11 +483,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -142,7 +142,7 @@ void SysTick_Handler(void)
|
||||
*/
|
||||
void ADC1_IRQHandler(void)
|
||||
{
|
||||
if(adc_flag_get(ADC1, ADC_VMOR_FLAG) != RESET)
|
||||
if(adc_interrupt_flag_get(ADC1, ADC_VMOR_FLAG) != RESET)
|
||||
{
|
||||
at32_led_toggle(LED3);
|
||||
adc_flag_clear(ADC1, ADC_VMOR_FLAG);
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>communication_mode</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -478,11 +478,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -108,7 +108,7 @@ static void can_configuration(void)
|
||||
nvic_irq_enable(CAN1_SE_IRQn, 0x00, 0x00);
|
||||
nvic_irq_enable(CAN1_RX0_IRQn, 0x00, 0x00);
|
||||
can_interrupt_enable(CAN1, CAN_RF0MIEN_INT, TRUE);
|
||||
|
||||
|
||||
/* error interrupt enable */
|
||||
can_interrupt_enable(CAN1, CAN_ETRIEN_INT, TRUE);
|
||||
can_interrupt_enable(CAN1, CAN_EOIEN_INT, TRUE);
|
||||
@@ -148,7 +148,7 @@ static void can_transmit_data(void)
|
||||
void CAN1_RX0_IRQHandler(void)
|
||||
{
|
||||
can_rx_message_type rx_message_struct;
|
||||
if(can_flag_get(CAN1,CAN_RF0MN_FLAG) != RESET)
|
||||
if(can_interrupt_flag_get(CAN1,CAN_RF0MN_FLAG) != RESET)
|
||||
{
|
||||
can_message_receive(CAN1, CAN_RX_FIFO0, &rx_message_struct);
|
||||
if(rx_message_struct.standard_id == 0x400)
|
||||
@@ -166,7 +166,7 @@ void CAN1_RX0_IRQHandler(void)
|
||||
void CAN1_SE_IRQHandler(void)
|
||||
{
|
||||
__IO uint32_t err_index = 0;
|
||||
if(can_flag_get(CAN1,CAN_ETR_FLAG) != RESET)
|
||||
if(can_interrupt_flag_get(CAN1,CAN_ETR_FLAG) != RESET)
|
||||
{
|
||||
err_index = CAN1->ests & 0x70;
|
||||
can_flag_clear(CAN1, CAN_ETR_FLAG);
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>filter</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -478,11 +478,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -133,7 +133,7 @@ static void can_configuration(void)
|
||||
nvic_irq_enable(CAN1_SE_IRQn, 0x00, 0x00);
|
||||
nvic_irq_enable(CAN1_RX0_IRQn, 0x00, 0x00);
|
||||
can_interrupt_enable(CAN1, CAN_RF0MIEN_INT, TRUE);
|
||||
|
||||
|
||||
/* error interrupt enable */
|
||||
can_interrupt_enable(CAN1, CAN_ETRIEN_INT, TRUE);
|
||||
can_interrupt_enable(CAN1, CAN_EOIEN_INT, TRUE);
|
||||
@@ -260,7 +260,7 @@ static void can_transmit_data(void)
|
||||
void CAN1_RX0_IRQHandler(void)
|
||||
{
|
||||
can_rx_message_type rx_message_struct;
|
||||
if(can_flag_get(CAN1,CAN_RF0MN_FLAG) != RESET)
|
||||
if(can_interrupt_flag_get(CAN1,CAN_RF0MN_FLAG) != RESET)
|
||||
{
|
||||
if(test_result == 4)
|
||||
{
|
||||
@@ -288,7 +288,7 @@ void CAN1_RX0_IRQHandler(void)
|
||||
void CAN1_SE_IRQHandler(void)
|
||||
{
|
||||
__IO uint32_t err_index = 0;
|
||||
if(can_flag_get(CAN1,CAN_ETR_FLAG) != RESET)
|
||||
if(can_interrupt_flag_get(CAN1,CAN_ETR_FLAG) != RESET)
|
||||
{
|
||||
err_index = CAN1->ests & 0x70;
|
||||
can_flag_clear(CAN1, CAN_ETR_FLAG);
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>loopback_mode</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -478,11 +478,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -108,7 +108,7 @@ static void can_configuration(void)
|
||||
nvic_irq_enable(CAN1_SE_IRQn, 0x00, 0x00);
|
||||
nvic_irq_enable(CAN1_RX0_IRQn, 0x00, 0x00);
|
||||
can_interrupt_enable(CAN1, CAN_RF0MIEN_INT, TRUE);
|
||||
|
||||
|
||||
/* error interrupt enable */
|
||||
can_interrupt_enable(CAN1, CAN_ETRIEN_INT, TRUE);
|
||||
can_interrupt_enable(CAN1, CAN_EOIEN_INT, TRUE);
|
||||
@@ -148,7 +148,7 @@ static void can_transmit_data(void)
|
||||
void CAN1_RX0_IRQHandler(void)
|
||||
{
|
||||
can_rx_message_type rx_message_struct;
|
||||
if(can_flag_get(CAN1,CAN_RF0MN_FLAG) != RESET)
|
||||
if(can_interrupt_flag_get(CAN1,CAN_RF0MN_FLAG) != RESET)
|
||||
{
|
||||
can_message_receive(CAN1, CAN_RX_FIFO0, &rx_message_struct);
|
||||
if(rx_message_struct.standard_id == 0x400)
|
||||
@@ -164,7 +164,7 @@ void CAN1_RX0_IRQHandler(void)
|
||||
void CAN1_SE_IRQHandler(void)
|
||||
{
|
||||
__IO uint32_t err_index = 0;
|
||||
if(can_flag_get(CAN1,CAN_ETR_FLAG) != RESET)
|
||||
if(can_interrupt_flag_get(CAN1,CAN_ETR_FLAG) != RESET)
|
||||
{
|
||||
err_index = CAN1->ests & 0x70;
|
||||
can_flag_clear(CAN1, CAN_ETR_FLAG);
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -483,11 +483,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>deep_sleep_mode</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -327,8 +327,8 @@
|
||||
<uC99>0</uC99>
|
||||
<uGnu>0</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>3</v6Lang>
|
||||
<v6LangP>3</v6LangP>
|
||||
<v6Lang>1</v6Lang>
|
||||
<v6LangP>1</v6LangP>
|
||||
<vShortEn>1</vShortEn>
|
||||
<vShortWch>1</vShortWch>
|
||||
<v6Lto>0</v6Lto>
|
||||
@@ -488,11 +488,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -138,7 +138,7 @@ void SysTick_Handler(void)
|
||||
|
||||
void CMP1_IRQHandler(void)
|
||||
{
|
||||
if(exint_flag_get(EXINT_LINE_19) != RESET)
|
||||
if(exint_interrupt_flag_get(EXINT_LINE_19) != RESET)
|
||||
{
|
||||
/* clear exint21 flag */
|
||||
exint_flag_clear(EXINT_LINE_19);
|
||||
|
||||
@@ -46,7 +46,7 @@ void cmp_exint_init(void)
|
||||
|
||||
exint_default_para_init(&exint_init_struct);
|
||||
exint_init_struct.line_enable = TRUE;
|
||||
exint_init_struct.line_mode = EXINT_LINE_INTERRUPUT;
|
||||
exint_init_struct.line_mode = EXINT_LINE_INTERRUPT;
|
||||
exint_init_struct.line_select = EXINT_LINE_19;
|
||||
exint_init_struct.line_polarity = EXINT_TRIGGER_FALLING_EDGE;
|
||||
exint_init(&exint_init_struct);
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>output</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -483,11 +483,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>bit_band</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -473,11 +473,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
<TargetName>cmsis_dsp</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>6140000::V6.14::ARMCLANG</pCCUsed>
|
||||
<uAC6>1</uAC6>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
<Device>-AT32F415RCT7</Device>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -312,7 +312,7 @@
|
||||
</ArmAdsMisc>
|
||||
<Cads>
|
||||
<interw>1</interw>
|
||||
<Optim>2</Optim>
|
||||
<Optim>1</Optim>
|
||||
<oTime>0</oTime>
|
||||
<SplitLS>0</SplitLS>
|
||||
<OneElfS>1</OneElfS>
|
||||
@@ -321,14 +321,14 @@
|
||||
<PlainCh>0</PlainCh>
|
||||
<Ropi>0</Ropi>
|
||||
<Rwpi>0</Rwpi>
|
||||
<wLevel>3</wLevel>
|
||||
<wLevel>2</wLevel>
|
||||
<uThumb>0</uThumb>
|
||||
<uSurpInc>0</uSurpInc>
|
||||
<uC99>0</uC99>
|
||||
<uGnu>0</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>3</v6Lang>
|
||||
<v6LangP>3</v6LangP>
|
||||
<v6Lang>1</v6Lang>
|
||||
<v6LangP>1</v6LangP>
|
||||
<vShortEn>1</vShortEn>
|
||||
<vShortWch>1</vShortWch>
|
||||
<v6Lto>0</v6Lto>
|
||||
@@ -543,11 +543,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -95,12 +95,7 @@ uint32_t student_num;
|
||||
*/
|
||||
int32_t main()
|
||||
{
|
||||
system_clock_config();
|
||||
|
||||
uart_print_init(115200);
|
||||
|
||||
#ifndef USE_STATIC_INIT
|
||||
|
||||
arm_matrix_instance_f32 srcA;
|
||||
arm_matrix_instance_f32 srcB;
|
||||
arm_matrix_instance_f32 dstC;
|
||||
@@ -109,15 +104,15 @@ int32_t main()
|
||||
arm_mat_init_f32(&srcA, numStudents, numSubjects, (float32_t *)testMarks_f32);
|
||||
arm_mat_init_f32(&srcB, numSubjects, 1, (float32_t *)testUnity_f32);
|
||||
arm_mat_init_f32(&dstC, numStudents, 1, testOutput);
|
||||
|
||||
#else
|
||||
|
||||
/* Static Initializations of Input and output matrix sizes and array */
|
||||
arm_matrix_instance_f32 srcA = {NUMSTUDENTS, NUMSUBJECTS, (float32_t *)testMarks_f32};
|
||||
arm_matrix_instance_f32 srcB = {NUMSUBJECTS, 1, (float32_t *)testUnity_f32};
|
||||
arm_matrix_instance_f32 dstC = {NUMSTUDENTS, 1, testOutput};
|
||||
|
||||
#endif
|
||||
system_clock_config();
|
||||
|
||||
uart_print_init(115200);
|
||||
|
||||
/* Call the Matrix multiplication process function */
|
||||
arm_mat_mult_f32(&srcA, &srcB, &dstC);
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>systick_interrupt</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -473,11 +473,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -55,6 +55,26 @@ void systick_handler(void)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief config systick and enable interrupt.
|
||||
* @param none
|
||||
* @retval none
|
||||
*/
|
||||
static uint32_t systick_interrupt_config(uint32_t ticks)
|
||||
{
|
||||
if ((ticks - 1UL) > SysTick_LOAD_RELOAD_Msk)
|
||||
{
|
||||
return (1UL);
|
||||
}
|
||||
|
||||
SysTick->LOAD = (uint32_t)(ticks - 1UL);
|
||||
NVIC_SetPriority (SysTick_IRQn, (1UL << __NVIC_PRIO_BITS) - 1UL);
|
||||
SysTick->VAL = 0UL;
|
||||
SysTick->CTRL |= SysTick_CTRL_TICKINT_Msk |
|
||||
SysTick_CTRL_ENABLE_Msk;
|
||||
return (0UL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief main function.
|
||||
* @param none
|
||||
@@ -68,7 +88,7 @@ int main(void)
|
||||
systick_clock_source_config(SYSTICK_CLOCK_SOURCE_AHBCLK_NODIV);
|
||||
|
||||
/* config systick reload value and enable interrupt */
|
||||
SysTick_Config(MS_TICK);
|
||||
systick_interrupt_config(MS_TICK);
|
||||
|
||||
/* configure led */
|
||||
at32_led_init(LED2);
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>calculation</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -478,11 +478,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>clock_failure_detection</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -473,11 +473,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>pll_config2</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -473,11 +473,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>sysclk_switch</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -473,11 +473,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>tmr1</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -483,11 +483,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -44,7 +44,7 @@ uint16_t counter = 0;
|
||||
*/
|
||||
void TMR1_OVF_TMR10_IRQHandler(void)
|
||||
{
|
||||
if(tmr_flag_get(TMR1, TMR_OVF_FLAG) != RESET)
|
||||
if(tmr_interrupt_flag_get(TMR1, TMR_OVF_FLAG) != RESET)
|
||||
{
|
||||
/* add user code... */
|
||||
at32_led_toggle(LED3);
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>data_to_gpio_flexible</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -483,11 +483,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -47,7 +47,7 @@ uint16_t src_buffer[BUFFER_SIZE] = {0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x00
|
||||
*/
|
||||
void DMA2_Channel1_IRQHandler(void)
|
||||
{
|
||||
if(dma_flag_get(DMA2_FDT1_FLAG) != RESET)
|
||||
if(dma_interrupt_flag_get(DMA2_FDT1_FLAG) != RESET)
|
||||
{
|
||||
/* turn led2/led3/led4 on */
|
||||
at32_led_on(LED2);
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>flash_to_sram</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -483,11 +483,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -59,7 +59,7 @@ error_status buffer_compare(const uint32_t* pbuffer, uint32_t* pbuffer1, uint16_
|
||||
*/
|
||||
void DMA1_Channel1_IRQHandler(void)
|
||||
{
|
||||
if(dma_flag_get(DMA1_FDT1_FLAG) != RESET)
|
||||
if(dma_interrupt_flag_get(DMA1_FDT1_FLAG) != RESET)
|
||||
{
|
||||
data_counter_end = 0;
|
||||
dma_flag_clear(DMA1_FDT1_FLAG);
|
||||
@@ -157,4 +157,3 @@ int main(void)
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>bpr_domain</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -488,11 +488,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
<aExt>*.s*; *.src; *.a*</aExt>
|
||||
<oExt>*.obj; *.o</oExt>
|
||||
<lExt>*.lib</lExt>
|
||||
<tExt>*.txt; *.h; *.inc</tExt>
|
||||
<tExt>*.txt; *.h; *.inc; *.md</tExt>
|
||||
<pExt>*.plm</pExt>
|
||||
<CppX>*.cpp</CppX>
|
||||
<CppX>*.cpp; *.cc; *.cxx</CppX>
|
||||
<nMigrate>0</nMigrate>
|
||||
</Extensions>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<TargetName>calendar</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pCCUsed>5060750::V5.06 update 6 (build 750)::.\ARMCC</pCCUsed>
|
||||
<pCCUsed>5060960::V5.06 update 7 (build 960)::.\ARMCC</pCCUsed>
|
||||
<uAC6>0</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
@@ -20,7 +20,7 @@
|
||||
<Cpu>IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM))</FlashDriverDll>
|
||||
<FlashDriverDll></FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:-AT32F415RCT7$Device\Include\at32f415.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
@@ -488,11 +488,6 @@
|
||||
<Layers>
|
||||
<Layer>
|
||||
<LayName><Project Info></LayName>
|
||||
<LayDesc></LayDesc>
|
||||
<LayUrl></LayUrl>
|
||||
<LayKeys></LayKeys>
|
||||
<LayCat></LayCat>
|
||||
<LayLic></LayLic>
|
||||
<LayTarg>0</LayTarg>
|
||||
<LayPrjMark>1</LayPrjMark>
|
||||
</Layer>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user