1 /* 2 * Copyright (c) 2024 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <nrf_sys_event.h> 8 #include <stdio.h> 9 main(void)10int main(void) 11 { 12 printf("request global constant latency mode\n"); 13 if (nrf_sys_event_request_global_constlat()) { 14 printf("failed to request global constant latency mode\n"); 15 return 0; 16 } 17 printf("constant latency mode enabled\n"); 18 19 printf("request global constant latency mode again\n"); 20 if (nrf_sys_event_request_global_constlat()) { 21 printf("failed to request global constant latency mode\n"); 22 return 0; 23 } 24 25 printf("release global constant latency mode\n"); 26 printf("constant latency mode will remain enabled\n"); 27 if (nrf_sys_event_release_global_constlat()) { 28 printf("failed to release global constant latency mode\n"); 29 return 0; 30 } 31 32 printf("release global constant latency mode again\n"); 33 printf("constant latency mode will be disabled\n"); 34 if (nrf_sys_event_release_global_constlat()) { 35 printf("failed to release global constant latency mode\n"); 36 return 0; 37 } 38 39 printf("constant latency mode disabled\n"); 40 return 0; 41 } 42