Appiko
|
Helpers specific to the nRF SoCs. More...
Macros | |
#define | LFCLK_FREQ 32768 |
#define | LFCLK_TICKS_MS(ms) ((uint32_t) ROUNDED_DIV( (LFCLK_FREQ*(uint64_t)ms) , 1000) ) |
#define | LFCLK_TICKS_625(ms) ((uint32_t) ROUNDED_DIV( (LFCLK_FREQ*(uint64_t)ms) , 1600) ) |
#define | LFCLK_TICKS_977(ms) ((uint32_t) (32*ms) ) |
#define | LFCLK_TICKS_1250(ms) ((uint32_t) ROUNDED_DIV( (LFCLK_FREQ*(uint64_t)ms) , 800) ) |
#define | CRITICAL_REGION_ENTER() |
Macro for entering a critical region. More... | |
#define | CRITICAL_REGION_EXIT() |
Macro for leaving a critical region. More... | |
Enumerations | |
enum | app_irq_priority_t |
Priority levels that the application can use based on whether the SoftDevice (SD) is used. More... | |
Functions | |
void | nrf_util_critical_region_enter (uint8_t *is_critical_entered) |
#define CRITICAL_REGION_ENTER | ( | ) |
Definition at line 103 of file nrf_util.h.
#define CRITICAL_REGION_EXIT | ( | ) |
Definition at line 113 of file nrf_util.h.
#define LFCLK_FREQ 32768 |
Marco that defines the LFCLK frequency
Definition at line 84 of file nrf_util.h.
#define LFCLK_TICKS_1250 | ( | ms | ) | ((uint32_t) ROUNDED_DIV( (LFCLK_FREQ*(uint64_t)ms) , 800) ) |
Macro to find out the number of LFCLK ticks for the passed time in multiples of 1.25 ms
Definition at line 93 of file nrf_util.h.
#define LFCLK_TICKS_625 | ( | ms | ) | ((uint32_t) ROUNDED_DIV( (LFCLK_FREQ*(uint64_t)ms) , 1600) ) |
Macro to find out the number of LFCLK ticks for the passed time in multiples of 0.625 ms
Definition at line 89 of file nrf_util.h.
#define LFCLK_TICKS_977 | ( | ms | ) | ((uint32_t) (32*ms) ) |
Macro to find out the number of LFCLK ticks for the passed time in multiples of 0.977 ms
Definition at line 91 of file nrf_util.h.
#define LFCLK_TICKS_MS | ( | ms | ) | ((uint32_t) ROUNDED_DIV( (LFCLK_FREQ*(uint64_t)ms) , 1000) ) |
Macro to find out the number of LFCLK ticks for the passed time in milli-seconds
Definition at line 87 of file nrf_util.h.
enum app_irq_priority_t |
For nRF51
With SD | Without SD | Priority |
---|---|---|
SD high | App highest | 0 |
App high | App high | 1 |
SD low | App mid | 2 |
App low | App low | 3 |
Thread | Thread | 4 |
For nRF52
With SD | Without SD | Priority |
---|---|---|
SD high | App highest | 0 |
SD mid | -Not defined- | 1 |
App high | App high | 2 |
App mid | -Not defined- | 3 |
SD low | App mid | 4 |
SD lowest | -Not defined- | 5 |
App low | App low | 6 |
App lowest | App lowest | 7 |
Thread | Thread | 15 |
Definition at line 63 of file nrf_util.h.
void nrf_util_critical_region_enter | ( | uint8_t * | is_critical_entered | ) |
nrf_util.c : nRF specific utilities Copyright (C) 2019 Appiko
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
Definition at line 28 of file nrf_util.c.