Skip to content

Commit

Permalink
Add ADC peripheral to GD32E103.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaizen Sparc authored and qwandor committed Jan 13, 2023
1 parent 720bd0c commit 845cdb6
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 7 deletions.
2 changes: 1 addition & 1 deletion devices/gd32e103.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _svd: ../svd/gd32e103.svd

_include:
- common_patches/gd32e1xx.yaml
#- ../peripherals/adc/adc.yaml
- ../peripherals/adc/adc_e1.yaml
- ../peripherals/can/can.yaml
- ../peripherals/crc/crc.yaml
- ../peripherals/dac/dac_e1.yaml
Expand Down
1 change: 1 addition & 0 deletions peripherals/adc/adc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
_include:
- "adc_common.yaml"
- "eteic.yaml"
- "swrcst.yaml"
6 changes: 0 additions & 6 deletions peripherals/adc/adc_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,6 @@ ADC*:
TSVREN:
Disabled: [0, "Channel 16 and 17 disabled"]
Enabled: [1, "Channel 16 and 17 enabled"]
SWRCST:
_read:
Started: [0, "Reset state"]
NotStarted: [1, "Starting conversion of regular channels"]
_write:
Start: [1, "Start conversion of regular channels"]
SWICST:
_read:
Started: [0, "Reset state"]
Expand Down
7 changes: 7 additions & 0 deletions peripherals/adc/adc_e1.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright 2023 The gd32-rs authors.
#
# SPDX-License-Identifier: MIT OR Apache-2.0

_include:
- "adc_common.yaml"
- "eteic.yaml"
1 change: 1 addition & 0 deletions peripherals/adc/adc_f2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ _include:
- "adc_common.yaml"
- "adc_high_f2_f3.yaml"
- "eteic.yaml"
- "swrcst.yaml"
1 change: 1 addition & 0 deletions peripherals/adc/adc_f3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
_include:
- "adc_common.yaml"
- "adc_high_f2_f3.yaml"
- "swrcst.yaml"
12 changes: 12 additions & 0 deletions peripherals/adc/swrcst.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2023 The gd32-rs authors.
#
# SPDX-License-Identifier: MIT OR Apache-2.0

ADC*:
CTL1:
SWRCST:
_read:
Started: [0, "Reset state"]
NotStarted: [1, "Starting conversion of regular channels"]
_write:
Start: [1, "Start conversion of regular channels"]

0 comments on commit 845cdb6

Please sign in to comment.