NRF51822: Fix baremetal linker error

Ensure the NRF51822 `us_ticker.c` module content is compiled in only if
the target supports USTICKER.
pull/12154/head
Hugues Kamba 2019-12-20 14:55:47 +00:00
parent af03f839e2
commit e0c628cbb7
2 changed files with 10 additions and 2 deletions

View File

@ -13,6 +13,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#if DEVICE_USTICKER
#include <stddef.h>
#include <stdbool.h>
#include "us_ticker_api.h"
@ -613,3 +615,4 @@ uint32_t os_tick_val(void) {
return clock_cycles_by_tick - ((current_counter - next_tick_cc_value) % clock_cycles_by_tick);
}
}
#endif // DEVICE_USTICKER

View File

@ -5043,8 +5043,13 @@
"SERIAL",
"SLEEP",
"SPI",
"SPISLAVE"
]
"SPISLAVE",
"USTICKER"
],
"overrides": {
"tickless-from-us-ticker" : true,
"boot-stack-size" : "0x400"
}
},
"MCU_NRF51_16K_BASE": {
"inherits": ["MCU_NRF51"],