Skip to content

Commit b691ff3

Browse files
authored
Merge pull request #5130 from mysterywolf/format
[bsp][es32] format codes
2 parents 56a37a0 + 3482bf8 commit b691ff3

Some content is hidden

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

97 files changed

+5973
-8799
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/es32f0654/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/es32f0654/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/es32f0654/drivers/ES/es_conf_info_cmu.h

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,27 @@
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

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

5050
#define ES_C_HOSC_DIV_1 CMU_PLL1_INPUT_HOSC
5151
#define ES_C_HOSC_DIV_2 CMU_PLL1_INPUT_HOSC_2

bsp/essemi/es32f0654/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

@@ -75,7 +75,7 @@ typedef struct {
7575

7676
/*GPIO外部中断回调函数控制需要,补充是否中断*/
7777
#if 11111
78-
78+
7979
#ifndef ES_INIT_GPIO_A_0_IRQ_EN
8080
#define ES_INIT_GPIO_A_0_IRQ_EN ES_C_GPIO_IRQ_DISABLE
8181
#endif
@@ -682,67 +682,67 @@ typedef struct {
682682
#if 11111
683683

684684
#ifdef ES_CONF_EXTI_IRQ_0
685-
void irq_pin0_callback(void* arg);
685+
void irq_pin0_callback(void* arg);
686686
#endif
687687

688688
#ifdef ES_CONF_EXTI_IRQ_1
689-
void irq_pin1_callback(void* arg);
690-
#endif
689+
void irq_pin1_callback(void* arg);
690+
#endif
691691

692692
#ifdef ES_CONF_EXTI_IRQ_2
693-
void irq_pin2_callback(void* arg);
693+
void irq_pin2_callback(void* arg);
694694
#endif
695695

696696
#ifdef ES_CONF_EXTI_IRQ_3
697-
void irq_pin3_callback(void* arg);
697+
void irq_pin3_callback(void* arg);
698698
#endif
699-
699+
700700
#ifdef ES_CONF_EXTI_IRQ_4
701-
void irq_pin4_callback(void* arg);
701+
void irq_pin4_callback(void* arg);
702702
#endif
703703

704704
#ifdef ES_CONF_EXTI_IRQ_5
705-
void irq_pin5_callback(void* arg);
706-
#endif
705+
void irq_pin5_callback(void* arg);
706+
#endif
707707

708708
#ifdef ES_CONF_EXTI_IRQ_6
709-
void irq_pin6_callback(void* arg);
709+
void irq_pin6_callback(void* arg);
710710
#endif
711711

712712
#ifdef ES_CONF_EXTI_IRQ_7
713-
void irq_pin7_callback(void* arg);
713+
void irq_pin7_callback(void* arg);
714714
#endif
715715

716716
#ifdef ES_CONF_EXTI_IRQ_8
717-
void irq_pin8_callback(void* arg);
717+
void irq_pin8_callback(void* arg);
718718
#endif
719719

720720
#ifdef ES_CONF_EXTI_IRQ_9
721-
void irq_pin9_callback(void* arg);
722-
#endif
721+
void irq_pin9_callback(void* arg);
722+
#endif
723723

724724
#ifdef ES_CONF_EXTI_IRQ_10
725-
void irq_pin10_callback(void* arg);
725+
void irq_pin10_callback(void* arg);
726726
#endif
727727

728728
#ifdef ES_CONF_EXTI_IRQ_11
729-
void irq_pin11_callback(void* arg);
729+
void irq_pin11_callback(void* arg);
730730
#endif
731731

732732
#ifdef ES_CONF_EXTI_IRQ_12
733-
void irq_pin12_callback(void* arg);
733+
void irq_pin12_callback(void* arg);
734734
#endif
735735

736736
#ifdef ES_CONF_EXTI_IRQ_13
737-
void irq_pin13_callback(void* arg);
738-
#endif
737+
void irq_pin13_callback(void* arg);
738+
#endif
739739

740740
#ifdef ES_CONF_EXTI_IRQ_14
741-
void irq_pin14_callback(void* arg);
741+
void irq_pin14_callback(void* arg);
742742
#endif
743743

744744
#ifdef ES_CONF_EXTI_IRQ_15
745-
void irq_pin15_callback(void* arg);
745+
void irq_pin15_callback(void* arg);
746746
#endif
747747

748748

@@ -783,7 +783,7 @@ void irq_pin15_callback(void* arg);
783783
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) || \
784784
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) || \
785785
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) || \
786-
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)
786+
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)
787787

788788
#define ES_INIT_GPIOS
789789

@@ -792,9 +792,9 @@ void irq_pin15_callback(void* arg);
792792

793793
#ifdef ES_INIT_GPIOS
794794

795-
static gpio_conf_t gpio_conf_all[] =
795+
static gpio_conf_t gpio_conf_all[] =
796796
{
797-
797+
798798
#ifdef ES_INIT_PIN_GPIO_A_0
799799

800800
{
@@ -5147,12 +5147,12 @@ static gpio_conf_t gpio_conf_all[] =
51475147

51485148
#endif
51495149

5150-
51515150

5152-
};
51535151

5154-
#endif
5155-
5156-
5152+
};
5153+
5154+
#endif
5155+
5156+
51575157

51585158
#endif

0 commit comments

Comments
 (0)