nrf: set interrupt priorities
The default priority is 0 (highest) which is reserved by the SoftDevice. For normal operation the exact priority level doesn't matter, only the relative priority matters. So this change makes the code compatible with the SoftDevice without actually changing the behavior.
Этот коммит содержится в:
родитель
fa5b75464d
коммит
9eaa6a7d7f
2 изменённых файлов: 2 добавлений и 1 удалений
|
@ -78,6 +78,7 @@ func (uart UART) Configure(config UARTConfig) {
|
|||
nrf.UART0.INTENSET = nrf.UART_INTENSET_RXDRDY_Msk
|
||||
|
||||
// Enable RX IRQ.
|
||||
arm.SetPriority(nrf.IRQ_UART0, 0xc0) // low priority
|
||||
arm.EnableIRQ(nrf.IRQ_UART0)
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ func initLFCLK() {
|
|||
|
||||
func initRTC() {
|
||||
nrf.RTC1.TASKS_START = 1
|
||||
// TODO: set priority
|
||||
arm.SetPriority(nrf.IRQ_RTC1, 0xc0) // low priority
|
||||
arm.EnableIRQ(nrf.IRQ_RTC1)
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче