From a6837f05a484c7e3b468a92bf8b83aac2c2d605d Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Thu, 23 Dec 2021 22:07:49 +0100 Subject: [PATCH] runtime: remove unused arrtype type aliases The arrtype aliases are used in the machine package. --- src/machine/machine_stm32_tim.go | 3 +++ src/runtime/runtime_stm32_timers.go | 3 --- src/runtime/runtime_stm32f103.go | 2 -- src/runtime/runtime_stm32f405.go | 2 -- src/runtime/runtime_stm32f407.go | 2 -- src/runtime/runtime_stm32f7x2.go | 2 -- src/runtime/runtime_stm32l0.go | 2 -- src/runtime/runtime_stm32l4x2.go | 2 -- src/runtime/runtime_stm32l5x2.go | 2 -- src/runtime/runtime_stm32wlx.go | 2 -- 10 files changed, 3 insertions(+), 19 deletions(-) diff --git a/src/machine/machine_stm32_tim.go b/src/machine/machine_stm32_tim.go index 1bcd8b769..41e4fb0f8 100644 --- a/src/machine/machine_stm32_tim.go +++ b/src/machine/machine_stm32_tim.go @@ -2,6 +2,9 @@ package machine +// The type alias `arrtype` should be defined to either uint32 or uint16 +// depending on the size of that register in the MCU's TIM_Type structure. + import ( "device/stm32" "runtime/interrupt" diff --git a/src/runtime/runtime_stm32_timers.go b/src/runtime/runtime_stm32_timers.go index dd64a36e0..f181eed65 100644 --- a/src/runtime/runtime_stm32_timers.go +++ b/src/runtime/runtime_stm32_timers.go @@ -8,9 +8,6 @@ package runtime // periodic interrupts at 100Hz (TICK_INTR_PERIOD_NS). The PWM counter // register is used for fine-grained resolution (down to ~150ns) with an // Output Comparator used for fine-grained sleeps. -// -// The type alias `arrtype` should be defined to either uint32 or uint16 -// depending on the size of that register in the MCU's TIM_Type structure. import ( "device/stm32" diff --git a/src/runtime/runtime_stm32f103.go b/src/runtime/runtime_stm32f103.go index 7775f5a18..44e103bcd 100644 --- a/src/runtime/runtime_stm32f103.go +++ b/src/runtime/runtime_stm32f103.go @@ -7,8 +7,6 @@ import ( "machine" ) -type arrtype = uint32 - func init() { initCLK() diff --git a/src/runtime/runtime_stm32f405.go b/src/runtime/runtime_stm32f405.go index a809cd444..26d19f792 100644 --- a/src/runtime/runtime_stm32f405.go +++ b/src/runtime/runtime_stm32f405.go @@ -64,8 +64,6 @@ const ( FLASH_OPTIONS = stm32.FLASH_ACR_ICEN | stm32.FLASH_ACR_DCEN | stm32.FLASH_ACR_PRFTEN ) -type arrtype = uint32 - func init() { initOSC() // configure oscillators initCLK() diff --git a/src/runtime/runtime_stm32f407.go b/src/runtime/runtime_stm32f407.go index 675939788..27ecd9559 100644 --- a/src/runtime/runtime_stm32f407.go +++ b/src/runtime/runtime_stm32f407.go @@ -26,8 +26,6 @@ const ( PLL_Q = 7 // USB OTS FS, SDIO and RNG Clock = PLL_VCO / PLL_Q ) -type arrtype = uint32 - func init() { initCLK() diff --git a/src/runtime/runtime_stm32f7x2.go b/src/runtime/runtime_stm32f7x2.go index 401962f6e..b29961978 100644 --- a/src/runtime/runtime_stm32f7x2.go +++ b/src/runtime/runtime_stm32f7x2.go @@ -25,8 +25,6 @@ const ( PLL_Q = 2 ) -type arrtype = uint32 - func init() { initCLK() diff --git a/src/runtime/runtime_stm32l0.go b/src/runtime/runtime_stm32l0.go index ef1be16d2..f6b66b3b7 100644 --- a/src/runtime/runtime_stm32l0.go +++ b/src/runtime/runtime_stm32l0.go @@ -11,8 +11,6 @@ const ( RCC_SYSCLK_DIV1 = 0 // Needs SVD update (should be stm32.RCC_SYSCLK_DIV1) ) -type arrtype = uint16 - func putchar(c byte) { machine.Serial.WriteByte(c) } diff --git a/src/runtime/runtime_stm32l4x2.go b/src/runtime/runtime_stm32l4x2.go index e1e69c3e9..1ce0945ea 100644 --- a/src/runtime/runtime_stm32l4x2.go +++ b/src/runtime/runtime_stm32l4x2.go @@ -50,8 +50,6 @@ const ( RCC_PLL_SYSCLK = stm32.RCC_PLLCFGR_PLLREN ) -type arrtype = uint32 - func init() { initCLK() diff --git a/src/runtime/runtime_stm32l5x2.go b/src/runtime/runtime_stm32l5x2.go index 0919d2b84..88e45c277 100644 --- a/src/runtime/runtime_stm32l5x2.go +++ b/src/runtime/runtime_stm32l5x2.go @@ -26,8 +26,6 @@ const ( PLL_R = 2 // RCC_PLLR_DIV2 ) -type arrtype = uint32 - func init() { initCLK() diff --git a/src/runtime/runtime_stm32wlx.go b/src/runtime/runtime_stm32wlx.go index 9f389f0f7..91c5a3f7d 100644 --- a/src/runtime/runtime_stm32wlx.go +++ b/src/runtime/runtime_stm32wlx.go @@ -8,8 +8,6 @@ import ( "machine" ) -type arrtype = uint32 - const ( /* PLL Options RMN0461.p247 */ PLL_M = 2