Skip to content

Commit 44cd38c

Browse files
ChazJinCruz Monrreal II
authored andcommitted
Style Format for GD32F30x standard peripheral files
1 parent 0769802 commit 44cd38c

Some content is hidden

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

48 files changed

+4577
-4641
lines changed

targets/TARGET_GigaDevice/TARGET_GD32F30X/GD32F30x_standard_peripheral/Include/gd32f30x_adc.h

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@
1010
1111
All rights reserved.
1212
13-
Redistribution and use in source and binary forms, with or without modification,
13+
Redistribution and use in source and binary forms, with or without modification,
1414
are permitted provided that the following conditions are met:
1515
16-
1. Redistributions of source code must retain the above copyright notice, this
16+
1. Redistributions of source code must retain the above copyright notice, this
1717
list of conditions and the following disclaimer.
18-
2. Redistributions in binary form must reproduce the above copyright notice,
19-
this list of conditions and the following disclaimer in the documentation
18+
2. Redistributions in binary form must reproduce the above copyright notice,
19+
this list of conditions and the following disclaimer in the documentation
2020
and/or other materials provided with the distribution.
21-
3. Neither the name of the copyright holder nor the names of its contributors
22-
may be used to endorse or promote products derived from this software without
21+
3. Neither the name of the copyright holder nor the names of its contributors
22+
may be used to endorse or promote products derived from this software without
2323
specific prior written permission.
2424
25-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28-
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29-
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30-
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
32-
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
25+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
32+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
3434
OF SUCH DAMAGE.
3535
*/
3636

@@ -333,50 +333,50 @@ void adc_tempsensor_vrefint_enable(void);
333333
void adc_tempsensor_vrefint_disable(void);
334334

335335
/* configure ADC resolution */
336-
void adc_resolution_config(uint32_t adc_periph , uint32_t resolution);
336+
void adc_resolution_config(uint32_t adc_periph, uint32_t resolution);
337337
/* configure ADC discontinuous mode */
338-
void adc_discontinuous_mode_config(uint32_t adc_periph , uint8_t adc_channel_group , uint8_t length);
338+
void adc_discontinuous_mode_config(uint32_t adc_periph, uint8_t adc_channel_group, uint8_t length);
339339

340340
/* configure the ADC mode */
341341
void adc_mode_config(uint32_t mode);
342342
/* enable or disable ADC special function */
343-
void adc_special_function_config(uint32_t adc_periph , uint32_t function , ControlStatus newvalue);
343+
void adc_special_function_config(uint32_t adc_periph, uint32_t function, ControlStatus newvalue);
344344
/* configure ADC data alignment */
345-
void adc_data_alignment_config(uint32_t adc_periph , uint32_t data_alignment);
345+
void adc_data_alignment_config(uint32_t adc_periph, uint32_t data_alignment);
346346
/* configure the length of regular channel group or inserted channel group */
347-
void adc_channel_length_config(uint32_t adc_periph , uint8_t adc_channel_group , uint32_t length);
347+
void adc_channel_length_config(uint32_t adc_periph, uint8_t adc_channel_group, uint32_t length);
348348
/* configure ADC regular channel */
349-
void adc_regular_channel_config(uint32_t adc_periph , uint8_t rank , uint8_t adc_channel , uint32_t sample_time);
349+
void adc_regular_channel_config(uint32_t adc_periph, uint8_t rank, uint8_t adc_channel, uint32_t sample_time);
350350
/* configure ADC inserted channel */
351-
void adc_inserted_channel_config(uint32_t adc_periph , uint8_t rank , uint8_t adc_channel , uint32_t sample_time);
351+
void adc_inserted_channel_config(uint32_t adc_periph, uint8_t rank, uint8_t adc_channel, uint32_t sample_time);
352352
/* configure ADC inserted channel offset */
353-
void adc_inserted_channel_offset_config(uint32_t adc_periph , uint8_t inserted_channel , uint16_t offset);
353+
void adc_inserted_channel_offset_config(uint32_t adc_periph, uint8_t inserted_channel, uint16_t offset);
354354
/* enable ADC external trigger */
355355
void adc_external_trigger_config(uint32_t adc_periph, uint8_t adc_channel_group, ControlStatus newvalue);
356356
/* configure ADC external trigger source */
357357
void adc_external_trigger_source_config(uint32_t adc_periph, uint8_t adc_channel_group, uint32_t external_trigger_source);
358358
/* enable ADC software trigger */
359-
void adc_software_trigger_enable(uint32_t adc_periph , uint8_t adc_channel_group);
359+
void adc_software_trigger_enable(uint32_t adc_periph, uint8_t adc_channel_group);
360360

361361
/* read ADC regular group data register */
362362
uint16_t adc_regular_data_read(uint32_t adc_periph);
363363
/* read ADC inserted group data register */
364-
uint16_t adc_inserted_data_read(uint32_t adc_periph , uint8_t inserted_channel);
364+
uint16_t adc_inserted_data_read(uint32_t adc_periph, uint8_t inserted_channel);
365365
/* read the last ADC0 and ADC1 conversion result data in sync mode */
366366
uint32_t adc_sync_mode_convert_value_read(void);
367367

368368
/* get the ADC flag bits */
369-
FlagStatus adc_flag_get(uint32_t adc_periph , uint32_t adc_flag);
369+
FlagStatus adc_flag_get(uint32_t adc_periph, uint32_t adc_flag);
370370
/* clear the ADC flag bits */
371-
void adc_flag_clear(uint32_t adc_periph , uint32_t adc_flag);
371+
void adc_flag_clear(uint32_t adc_periph, uint32_t adc_flag);
372372
/* get the ADC interrupt bits */
373-
FlagStatus adc_interrupt_flag_get(uint32_t adc_periph , uint32_t adc_interrupt);
373+
FlagStatus adc_interrupt_flag_get(uint32_t adc_periph, uint32_t adc_interrupt);
374374
/* clear the ADC flag */
375-
void adc_interrupt_flag_clear(uint32_t adc_periph , uint32_t adc_interrupt);
375+
void adc_interrupt_flag_clear(uint32_t adc_periph, uint32_t adc_interrupt);
376376
/* enable ADC interrupt */
377-
void adc_interrupt_enable(uint32_t adc_periph , uint32_t adc_interrupt);
377+
void adc_interrupt_enable(uint32_t adc_periph, uint32_t adc_interrupt);
378378
/* disable ADC interrupt */
379-
void adc_interrupt_disable(uint32_t adc_periph , uint32_t adc_interrupt);
379+
void adc_interrupt_disable(uint32_t adc_periph, uint32_t adc_interrupt);
380380

381381
/* configure ADC analog watchdog single channel */
382382
void adc_watchdog_single_channel_enable(uint32_t adc_periph, uint8_t adc_channel);
@@ -385,10 +385,10 @@ void adc_watchdog_group_channel_enable(uint32_t adc_periph, uint8_t adc_channel_
385385
/* disable ADC analog watchdog */
386386
void adc_watchdog_disable(uint32_t adc_periph);
387387
/* configure ADC analog watchdog threshold */
388-
void adc_watchdog_threshold_config(uint32_t adc_periph , uint16_t low_threshold , uint16_t high_threshold);
388+
void adc_watchdog_threshold_config(uint32_t adc_periph, uint16_t low_threshold, uint16_t high_threshold);
389389

390390
/* configure ADC oversample mode */
391-
void adc_oversample_mode_config(uint32_t adc_periph , uint8_t mode , uint16_t shift , uint8_t ratio);
391+
void adc_oversample_mode_config(uint32_t adc_periph, uint8_t mode, uint16_t shift, uint8_t ratio);
392392
/* enable ADC oversample mode */
393393
void adc_oversample_mode_enable(uint32_t adc_periph);
394394
/* disable ADC oversample mode */

targets/TARGET_GigaDevice/TARGET_GD32F30X/GD32F30x_standard_peripheral/Include/gd32f30x_bkp.h

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,27 @@
1010
1111
All rights reserved.
1212
13-
Redistribution and use in source and binary forms, with or without modification,
13+
Redistribution and use in source and binary forms, with or without modification,
1414
are permitted provided that the following conditions are met:
1515
16-
1. Redistributions of source code must retain the above copyright notice, this
16+
1. Redistributions of source code must retain the above copyright notice, this
1717
list of conditions and the following disclaimer.
18-
2. Redistributions in binary form must reproduce the above copyright notice,
19-
this list of conditions and the following disclaimer in the documentation
18+
2. Redistributions in binary form must reproduce the above copyright notice,
19+
this list of conditions and the following disclaimer in the documentation
2020
and/or other materials provided with the distribution.
21-
3. Neither the name of the copyright holder nor the names of its contributors
22-
may be used to endorse or promote products derived from this software without
21+
3. Neither the name of the copyright holder nor the names of its contributors
22+
may be used to endorse or promote products derived from this software without
2323
specific prior written permission.
2424
25-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27-
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28-
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29-
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30-
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31-
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
32-
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
25+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
28+
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
29+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
30+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
31+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
32+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
3434
OF SUCH DAMAGE.
3535
*/
3636

@@ -146,8 +146,7 @@ OF SUCH DAMAGE.
146146
#define BKP_INT_FLAG_TAMPER BKP_TPCS_TIF /*!< tamper interrupt flag */
147147

148148
/* BKP data register number */
149-
typedef enum
150-
{
149+
typedef enum {
151150
BKP_DATA_0 = 1, /*!< BKP data register 0 */
152151
BKP_DATA_1, /*!< BKP data register 1 */
153152
BKP_DATA_2, /*!< BKP data register 2 */
@@ -190,7 +189,7 @@ typedef enum
190189
BKP_DATA_39, /*!< BKP data register 39 */
191190
BKP_DATA_40, /*!< BKP data register 40 */
192191
BKP_DATA_41, /*!< BKP data register 41 */
193-
}bkp_data_register_enum;
192+
} bkp_data_register_enum;
194193

195194
/* function declarations */
196195
/* reset BKP registers */

0 commit comments

Comments
 (0)