From 8e2437a6c39fe13463171083db23b6027fae8404 Mon Sep 17 00:00:00 2001 From: eZio Pan Date: Tue, 2 Jan 2024 19:01:53 +0800 Subject: [PATCH] rtc-cleanup --- data/registers/rtc_v3l5.yaml | 22 ++-------------------- transforms/RTC.yaml | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 20 deletions(-) create mode 100644 transforms/RTC.yaml diff --git a/data/registers/rtc_v3l5.yaml b/data/registers/rtc_v3l5.yaml index 5acd235..7405a64 100644 --- a/data/registers/rtc_v3l5.yaml +++ b/data/registers/rtc_v3l5.yaml @@ -713,10 +713,10 @@ enum/ALRMF: enum/ALRMR_MSK: bit_size: 1 variants: - - name: Mask + - name: ToMatch description: Alarm set if the date/day match value: 0 - - name: NotMask + - name: NotMatch description: Date/day don’t care in Alarm comparison value: 1 enum/ALRMR_PM: @@ -854,15 +854,6 @@ enum/RECALPF: - name: Pending description: The RECALPF status flag is automatically set to 1 when software writes to the RTC_CALR register, indicating that the RTC_CALR register is blocked. When the new calibration settings are taken into account, this bit returns to 0 value: 1 -enum/REFCKON: - bit_size: 1 - variants: - - name: Disabled - description: RTC_REFIN detection disabled - value: 0 - - name: Enabled - description: RTC_REFIN detection enabled - value: 1 enum/SSRUF: bit_size: 1 variants: @@ -875,15 +866,6 @@ enum/SSRUMF: - name: Underflow description: This flag is set by hardware when the SSR rolls under 0. SSRUF is not set when SSCLR=1 value: 1 -enum/TAMPALRM_PU: - bit_size: 1 - variants: - - name: NoPullUp - description: No pull-up is applied on TAMPALRM output - value: 0 - - name: PullUp - description: A pull-up is applied on TAMPALRM output - value: 1 enum/TAMPALRM_TYPE: bit_size: 1 variants: diff --git a/transforms/RTC.yaml b/transforms/RTC.yaml new file mode 100644 index 0000000..fee133e --- /dev/null +++ b/transforms/RTC.yaml @@ -0,0 +1,19 @@ +transforms: + - !DeleteEnums + from: ^(CNF|REFCKON|ALRWF|INIT|TAMPALRM_PU)$ + - !RenameEnumVariants + enum: ^RTOFF$ + from: Enabled + to: Ongoing + - !RenameEnumVariants + enum: ^RTOFF$ + from: Disabled + to: Terminated + - !RenameEnumVariants + enum: ^ALRMR_MSK$ + from: Mask + to: ToMatch + - !RenameEnumVariants + enum: ^ALRMR_MSK$ + from: NotMask + to: NotMatch