rfLPC
A low level library for using NXP's LPC17xx SoC. Config is given for MBED prototyping board
|
Macro that can be used to profile some parts of your code. More...
#include "drivers/timer.h"
Go to the source code of this file.
Macros | |
#define | RFLPC_PROFILE_PRESCALE (rflpc_clock_get_system_clock() / 1000000) |
This holds the value of the prescale counter that will be used for time measurement. More... | |
#define | RFLPC_PROFILE_INIT(timer) do {rflpc_timer_enable(timer); rflpc_timer_set_clock(timer, RFLPC_CCLK); rflpc_timer_set_pre_scale_register(timer,RFLPC_PROFILE_PRESCALE); rflpc_timer_start(timer); } while(0) |
Inits a given timer so that it can be used for profiling. More... | |
#define | RFLPC_PROFILE_DECLARE_COUNTER(counter) volatile uint32_t rflpc_profile_total_##counter; volatile uint32_t rflpc_profile_start_##counter; |
Declares the needed global variables for profiling. More... | |
#define | RFLPC_PROFILE_DECLARE_EXTERN_COUNTER(counter) extern volatile uint32_t rflpc_profile_total_##counter;extern volatile uint32_t rflpc_profile_start_##counter; |
Declare the needed global variables for profiling as externs. More... | |
#define | RFLPC_PROFILE_START_COUNTER(counter, timer) do { rflpc_profile_start_##counter = rflpc_timer_get_counter(timer);} while(0) |
Starts a given counter, storing the current time of the given timer. | |
#define | RFLPC_PROFILE_STOP_COUNTER(counter, timer) do { rflpc_profile_total_##counter += rflpc_timer_get_counter(timer) - rflpc_profile_start_##counter;} while(0) |
Stops a given counter, adding the elapsed time since its start to the global counter. | |
#define | RFLPC_PROFILE_GET_TOTAL(counter) rflpc_profile_total_##counter |
Gets the global counter value. More... | |
Macro that can be used to profile some parts of your code.
Definition in file profiling.h.