all: avoid _Msk fields when not necessary

Этот коммит содержится в:
Ayke van Laethem 2018-09-22 17:42:44 +02:00
родитель eadec6f766
коммит 4d5b5241ec
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: E97FF5335DFDFDED
2 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -51,7 +51,7 @@ func (p GPIO) Configure(config GPIOConfig) {
// Enable clock. // Enable clock.
// Do this always, as it isn't known whether the clock has already been // Do this always, as it isn't known whether the clock has already been
// enabled. // enabled.
stm32.RCC.APB2ENR |= stm32.RCC_APB2ENR_IOPCEN_Msk; stm32.RCC.APB2ENR |= stm32.RCC_APB2ENR_IOPCEN
// Configure the GPIO pin. // Configure the GPIO pin.
port := p.getPort() port := p.getPort()

Просмотреть файл

@ -86,7 +86,7 @@ type __volatile bool
var rtc_wakeup __volatile var rtc_wakeup __volatile
func rtc_sleep(ticks uint32) { func rtc_sleep(ticks uint32) {
nrf.RTC0.INTENSET = nrf.RTC_INTENSET_COMPARE0_Msk nrf.RTC0.INTENSET = nrf.RTC_INTENSET_COMPARE0
rtc_wakeup = false rtc_wakeup = false
if ticks == 1 { if ticks == 1 {
// Race condition (even in hardware) at ticks == 1. // Race condition (even in hardware) at ticks == 1.
@ -102,7 +102,7 @@ func rtc_sleep(ticks uint32) {
//go:export RTC0_IRQHandler //go:export RTC0_IRQHandler
func handleRTC0() { func handleRTC0() {
nrf.RTC0.INTENCLR = nrf.RTC_INTENSET_COMPARE0_Msk nrf.RTC0.INTENCLR = nrf.RTC_INTENSET_COMPARE0
nrf.RTC0.EVENTS_COMPARE[0] = 0 nrf.RTC0.EVENTS_COMPARE[0] = 0
rtc_wakeup = true rtc_wakeup = true
} }