Skip to content

Commit 3482bf8

Browse files
committed
format es32f369x
1 parent 421867f commit 3482bf8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+3115
-4532
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# files format check exclude path, please follow the instructions below to modify;
2+
3+
dir_path:
4+
- libraries

bsp/essemi/es32f369x/drivers/ES/es_conf_info_adc.h

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,30 @@
2323

2424
#ifndef __ES_CONF_INFO_ADC_H__
2525
#define __ES_CONF_INFO_ADC_H__
26-
26+
2727
#include "es_conf_info_map.h"
2828

2929
#include <ald_adc.h>
3030

3131

32-
#define ES_C_ADC_CLK_DIV_1 ADC_CKDIV_1
32+
#define ES_C_ADC_CLK_DIV_1 ADC_CKDIV_1
3333
#define ES_C_ADC_CLK_DIV_2 ADC_CKDIV_2
3434
#define ES_C_ADC_CLK_DIV_4 ADC_CKDIV_4
3535
#define ES_C_ADC_CLK_DIV_8 ADC_CKDIV_8
3636
#define ES_C_ADC_CLK_DIV_16 ADC_CKDIV_16
37-
#define ES_C_ADC_CLK_DIV_32 ADC_CKDIV_32
37+
#define ES_C_ADC_CLK_DIV_32 ADC_CKDIV_32
3838
#define ES_C_ADC_CLK_DIV_64 ADC_CKDIV_64
3939
#define ES_C_ADC_CLK_DIV_128 ADC_CKDIV_128
4040

41-
#define ES_C_ADC_ALIGN_RIGHT ADC_DATAALIGN_RIGHT
41+
#define ES_C_ADC_ALIGN_RIGHT ADC_DATAALIGN_RIGHT
4242
#define ES_C_ADC_ALIGN_LEFT ADC_DATAALIGN_LEFT
4343

44-
#define ES_C_ADC_CONV_BIT_6 ADC_CONV_BIT_6
44+
#define ES_C_ADC_CONV_BIT_6 ADC_CONV_BIT_6
4545
#define ES_C_ADC_CONV_BIT_8 ADC_CONV_BIT_8
4646
#define ES_C_ADC_CONV_BIT_10 ADC_CONV_BIT_10
4747
#define ES_C_ADC_CONV_BIT_12 ADC_CONV_BIT_12
48-
49-
#define ES_C_ADC_SAMPLE_TIME_1 ADC_SAMPLETIME_1
48+
49+
#define ES_C_ADC_SAMPLE_TIME_1 ADC_SAMPLETIME_1
5050
#define ES_C_ADC_SAMPLE_TIME_2 ADC_SAMPLETIME_2
5151
#define ES_C_ADC_SAMPLE_TIME_4 ADC_SAMPLETIME_4
5252
#define ES_C_ADC_SAMPLE_TIME_15 ADC_SAMPLETIME_15
@@ -56,41 +56,41 @@
5656
/* codes_main */
5757

5858

59-
#define ES_ADC0_ALIGN ES_C_ADC_ALIGN_RIGHT
60-
#define ES_ADC1_ALIGN ES_C_ADC_ALIGN_RIGHT
61-
#define ES_ADC1_DATA_BIT ES_C_ADC_CONV_BIT_12
59+
#define ES_ADC0_ALIGN ES_C_ADC_ALIGN_RIGHT
60+
#define ES_ADC1_ALIGN ES_C_ADC_ALIGN_RIGHT
61+
#define ES_ADC1_DATA_BIT ES_C_ADC_CONV_BIT_12
6262
#define ES_ADC0_DATA_BIT ES_C_ADC_CONV_BIT_12
6363

6464
#ifndef ES_DEVICE_NAME_ADC0
6565
#define ES_DEVICE_NAME_ADC0 "adc0"
66-
#endif
66+
#endif
6767
#ifndef ES_DEVICE_NAME_ADC1
6868
#define ES_DEVICE_NAME_ADC1 "adc1"
6969
#endif
7070

71-
#ifndef ES_ADC0_CLK_DIV
72-
#define ES_ADC0_CLK_DIV ES_C_ADC_CLK_DIV_128
73-
#endif
74-
#ifndef ES_ADC0_ALIGN
71+
#ifndef ES_ADC0_CLK_DIV
72+
#define ES_ADC0_CLK_DIV ES_C_ADC_CLK_DIV_128
73+
#endif
74+
#ifndef ES_ADC0_ALIGN
7575
#define ES_ADC0_ALIGN ES_C_ADC_ALIGN_RIGHT
7676
#endif
77-
#ifndef ES_ADC0_DATA_BIT
77+
#ifndef ES_ADC0_DATA_BIT
7878
#define ES_ADC0_DATA_BIT ES_C_ADC_CONV_BIT_12
7979
#endif
80-
#ifndef ES_ADC0_NCH_SAMPLETIME
80+
#ifndef ES_ADC0_NCH_SAMPLETIME
8181
#define ES_ADC0_NCH_SAMPLETIME ES_C_ADC_SAMPLE_TIME_4
8282
#endif
8383

84-
#ifndef ES_ADC1_CLK_DIV
85-
#define ES_ADC1_CLK_DIV ES_C_ADC_CLK_DIV_128
86-
#endif
87-
#ifndef ES_ADC1_ALIGN
84+
#ifndef ES_ADC1_CLK_DIV
85+
#define ES_ADC1_CLK_DIV ES_C_ADC_CLK_DIV_128
86+
#endif
87+
#ifndef ES_ADC1_ALIGN
8888
#define ES_ADC1_ALIGN ES_C_ADC_ALIGN_RIGHT
8989
#endif
90-
#ifndef ES_ADC1_DATA_BIT
90+
#ifndef ES_ADC1_DATA_BIT
9191
#define ES_ADC1_DATA_BIT ES_C_ADC_CONV_BIT_12
9292
#endif
93-
#ifndef ES_ADC1_NCH_SAMPLETIME
93+
#ifndef ES_ADC1_NCH_SAMPLETIME
9494
#define ES_ADC1_NCH_SAMPLETIME ES_C_ADC_SAMPLE_TIME_4
9595
#endif
9696

bsp/essemi/es32f369x/drivers/ES/es_conf_info_can.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,19 +32,19 @@
3232
/*默认的CAN硬件过滤器的编号 0 */
3333
#define ES_C_CAN_DEFAULT_FILTER_NUMBER 0
3434

35-
/*硬件过滤器,过滤帧类型*/
35+
/*硬件过滤器,过滤帧类型*/
3636
#define ES_C_CAN_FILTER_FRAME_TYPE 0
3737

3838

39-
#define ES_C_CAN_SJW_NUM_1 CAN_SJW_1
39+
#define ES_C_CAN_SJW_NUM_1 CAN_SJW_1
4040
#define ES_C_CAN_SJW_NUM_2 CAN_SJW_2
4141
#define ES_C_CAN_SJW_NUM_3 CAN_SJW_3
4242
#define ES_C_CAN_SJW_NUM_4 CAN_SJW_4
4343

4444

4545

4646
/* CAN 配置 */
47-
47+
4848
/* codes_main */
4949

5050

@@ -55,7 +55,7 @@
5555

5656
#ifndef ES_CAN0_AUTO_BAN_RE_T
5757
#define ES_CAN0_AUTO_BAN_RE_T ES_C_ENABLE
58-
#endif
58+
#endif
5959
#ifndef ES_CAN0_SPEED
6060
#define ES_CAN0_SPEED 1000000
6161
#endif

bsp/essemi/es32f369x/drivers/ES/es_conf_info_cmu.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,29 +25,29 @@
2525
#define __ES_CONF_INFO_CMU_H__
2626

2727

28-
#include <ald_cmu.h>
28+
#include <ald_cmu.h>
2929

3030

3131
/* 时钟树 配置 */
3232

3333
#define ES_C_MUL_9 CMU_PLL1_OUTPUT_36M
3434
#define ES_C_MUL_12 CMU_PLL1_OUTPUT_48M
3535
#define ES_C_MUL_18 CMU_PLL1_OUTPUT_72M
36-
#define ES_C_MUL_24 CMU_PLL1_OUTPUT_96M
36+
#define ES_C_MUL_24 CMU_PLL1_OUTPUT_96M
3737

38-
#define ES_C_DIV_1 CMU_DIV_1
39-
#define ES_C_DIV_2 CMU_DIV_2
40-
#define ES_C_DIV_4 CMU_DIV_4
41-
#define ES_C_DIV_8 CMU_DIV_8
42-
#define ES_C_DIV_16 CMU_DIV_16
43-
#define ES_C_DIV_32 CMU_DIV_32
44-
#define ES_C_DIV_64 CMU_DIV_64
45-
#define ES_C_DIV_128 CMU_DIV_128
46-
#define ES_C_DIV_256 CMU_DIV_256
47-
#define ES_C_DIV_512 CMU_DIV_512
48-
#define ES_C_DIV_1024 CMU_DIV_1024
49-
#define ES_C_DIV_2048 CMU_DIV_2048
50-
#define ES_C_DIV_4096 CMU_DIV_4096
38+
#define ES_C_DIV_1 CMU_DIV_1
39+
#define ES_C_DIV_2 CMU_DIV_2
40+
#define ES_C_DIV_4 CMU_DIV_4
41+
#define ES_C_DIV_8 CMU_DIV_8
42+
#define ES_C_DIV_16 CMU_DIV_16
43+
#define ES_C_DIV_32 CMU_DIV_32
44+
#define ES_C_DIV_64 CMU_DIV_64
45+
#define ES_C_DIV_128 CMU_DIV_128
46+
#define ES_C_DIV_256 CMU_DIV_256
47+
#define ES_C_DIV_512 CMU_DIV_512
48+
#define ES_C_DIV_1024 CMU_DIV_1024
49+
#define ES_C_DIV_2048 CMU_DIV_2048
50+
#define ES_C_DIV_4096 CMU_DIV_4096
5151

5252
#define ES_C_HOSC_DIV_1 CMU_PLL1_INPUT_HOSC
5353
#define ES_C_HOSC_DIV_2 CMU_PLL1_INPUT_HOSC_2

bsp/essemi/es32f369x/drivers/ES/es_conf_info_gpio.h

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,29 @@
3333
/* GPIO 配置 */
3434

3535
typedef struct {
36-
uint8_t pin;
37-
uint8_t pin_mode;
38-
uint8_t pin_level;
39-
uint8_t irq_en;
40-
uint8_t irq_mode;
41-
void (*callback)(void *arg);
36+
uint8_t pin;
37+
uint8_t pin_mode;
38+
uint8_t pin_level;
39+
uint8_t irq_en;
40+
uint8_t irq_mode;
41+
void (*callback)(void *arg);
4242
} gpio_conf_t;
4343

4444
/*参数的定义*/
4545

46-
#define ES_C_GPIO_LEVEL_HIGH PIN_HIGH
46+
#define ES_C_GPIO_LEVEL_HIGH PIN_HIGH
4747
#define ES_C_GPIO_LEVEL_LOW PIN_LOW
4848

49-
#define ES_C_GPIO_MODE_OUTPUT PIN_MODE_OUTPUT
50-
#define ES_C_GPIO_MODE_INPUT PIN_MODE_INPUT
51-
#define ES_C_GPIO_MODE_INPUT_PULLUP PIN_MODE_INPUT_PULLUP
52-
#define ES_C_GPIO_MODE_INPUT_PULLDOWN PIN_MODE_INPUT_PULLDOWN
53-
#define ES_C_GPIO_MODE_OUTPUT_OD PIN_MODE_OUTPUT_OD
49+
#define ES_C_GPIO_MODE_OUTPUT PIN_MODE_OUTPUT
50+
#define ES_C_GPIO_MODE_INPUT PIN_MODE_INPUT
51+
#define ES_C_GPIO_MODE_INPUT_PULLUP PIN_MODE_INPUT_PULLUP
52+
#define ES_C_GPIO_MODE_INPUT_PULLDOWN PIN_MODE_INPUT_PULLDOWN
53+
#define ES_C_GPIO_MODE_OUTPUT_OD PIN_MODE_OUTPUT_OD
5454

55-
#define ES_C_GPIO_IRQ_ENABLE PIN_IRQ_ENABLE
55+
#define ES_C_GPIO_IRQ_ENABLE PIN_IRQ_ENABLE
5656
#define ES_C_GPIO_IRQ_DISABLE PIN_IRQ_DISABLE
5757

58-
#define ES_C_GPIO_IRQ_MODE_FALL PIN_IRQ_MODE_FALLING
58+
#define ES_C_GPIO_IRQ_MODE_FALL PIN_IRQ_MODE_FALLING
5959
#define ES_C_GPIO_IRQ_MODE_RISE PIN_IRQ_MODE_RISING
6060
#define ES_C_GPIO_IRQ_MODE_R_F PIN_IRQ_MODE_RISING_FALLING
6161

@@ -74,7 +74,7 @@ typedef struct {
7474

7575
/*GPIO外部中断回调函数控制需要,补充是否中断*/
7676
#if 11111
77-
77+
7878
#ifndef ES_INIT_GPIO_A_0_IRQ_EN
7979
#define ES_INIT_GPIO_A_0_IRQ_EN ES_C_GPIO_IRQ_DISABLE
8080
#endif
@@ -681,67 +681,67 @@ typedef struct {
681681
#if 11111
682682

683683
#ifdef ES_CONF_EXTI_IRQ_0
684-
void irq_pin0_callback(void* arg);
684+
void irq_pin0_callback(void* arg);
685685
#endif
686686

687687
#ifdef ES_CONF_EXTI_IRQ_1
688-
void irq_pin1_callback(void* arg);
689-
#endif
688+
void irq_pin1_callback(void* arg);
689+
#endif
690690

691691
#ifdef ES_CONF_EXTI_IRQ_2
692-
void irq_pin2_callback(void* arg);
692+
void irq_pin2_callback(void* arg);
693693
#endif
694694

695695
#ifdef ES_CONF_EXTI_IRQ_3
696-
void irq_pin3_callback(void* arg);
696+
void irq_pin3_callback(void* arg);
697697
#endif
698-
698+
699699
#ifdef ES_CONF_EXTI_IRQ_4
700-
void irq_pin4_callback(void* arg);
700+
void irq_pin4_callback(void* arg);
701701
#endif
702702

703703
#ifdef ES_CONF_EXTI_IRQ_5
704-
void irq_pin5_callback(void* arg);
705-
#endif
704+
void irq_pin5_callback(void* arg);
705+
#endif
706706

707707
#ifdef ES_CONF_EXTI_IRQ_6
708-
void irq_pin6_callback(void* arg);
708+
void irq_pin6_callback(void* arg);
709709
#endif
710710

711711
#ifdef ES_CONF_EXTI_IRQ_7
712-
void irq_pin7_callback(void* arg);
712+
void irq_pin7_callback(void* arg);
713713
#endif
714714

715715
#ifdef ES_CONF_EXTI_IRQ_8
716-
void irq_pin8_callback(void* arg);
716+
void irq_pin8_callback(void* arg);
717717
#endif
718718

719719
#ifdef ES_CONF_EXTI_IRQ_9
720-
void irq_pin9_callback(void* arg);
721-
#endif
720+
void irq_pin9_callback(void* arg);
721+
#endif
722722

723723
#ifdef ES_CONF_EXTI_IRQ_10
724-
void irq_pin10_callback(void* arg);
724+
void irq_pin10_callback(void* arg);
725725
#endif
726726

727727
#ifdef ES_CONF_EXTI_IRQ_11
728-
void irq_pin11_callback(void* arg);
728+
void irq_pin11_callback(void* arg);
729729
#endif
730730

731731
#ifdef ES_CONF_EXTI_IRQ_12
732-
void irq_pin12_callback(void* arg);
732+
void irq_pin12_callback(void* arg);
733733
#endif
734734

735735
#ifdef ES_CONF_EXTI_IRQ_13
736-
void irq_pin13_callback(void* arg);
737-
#endif
736+
void irq_pin13_callback(void* arg);
737+
#endif
738738

739739
#ifdef ES_CONF_EXTI_IRQ_14
740-
void irq_pin14_callback(void* arg);
740+
void irq_pin14_callback(void* arg);
741741
#endif
742742

743743
#ifdef ES_CONF_EXTI_IRQ_15
744-
void irq_pin15_callback(void* arg);
744+
void irq_pin15_callback(void* arg);
745745
#endif
746746

747747

@@ -782,7 +782,7 @@ void irq_pin15_callback(void* arg);
782782
defined(ES_INIT_PIN_GPIO_H_0) || defined(ES_INIT_PIN_GPIO_H_1) || defined(ES_INIT_PIN_GPIO_H_2) || defined(ES_INIT_PIN_GPIO_H_3) || \
783783
defined(ES_INIT_PIN_GPIO_H_4) || defined(ES_INIT_PIN_GPIO_H_5) || defined(ES_INIT_PIN_GPIO_H_6) || defined(ES_INIT_PIN_GPIO_H_7) || \
784784
defined(ES_INIT_PIN_GPIO_H_8) || defined(ES_INIT_PIN_GPIO_H_9) || defined(ES_INIT_PIN_GPIO_H_10) || defined(ES_INIT_PIN_GPIO_H_11) || \
785-
defined(ES_INIT_PIN_GPIO_H_12) || defined(ES_INIT_PIN_GPIO_H_13) || defined(ES_INIT_PIN_GPIO_H_14) || defined(ES_INIT_PIN_GPIO_H_15)
785+
defined(ES_INIT_PIN_GPIO_H_12) || defined(ES_INIT_PIN_GPIO_H_13) || defined(ES_INIT_PIN_GPIO_H_14) || defined(ES_INIT_PIN_GPIO_H_15)
786786

787787
#define ES_INIT_GPIOS
788788

@@ -791,9 +791,9 @@ void irq_pin15_callback(void* arg);
791791

792792
#ifdef ES_INIT_GPIOS
793793

794-
static gpio_conf_t gpio_conf_all[] =
794+
static gpio_conf_t gpio_conf_all[] =
795795
{
796-
796+
797797
#ifdef ES_INIT_PIN_GPIO_A_0
798798

799799
{
@@ -5146,12 +5146,12 @@ static gpio_conf_t gpio_conf_all[] =
51465146

51475147
#endif
51485148

5149-
51505149

5151-
};
51525150

5153-
#endif
5154-
5155-
5151+
};
5152+
5153+
#endif
5154+
5155+
51565156

51575157
#endif

0 commit comments

Comments
 (0)