123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- #ifndef __TOOL_H__
- #define __TOOL_H__
- #include "arm_math.h"
- #include <stdbool.h>
- #include <stdint.h>
- #include <string.h>
- #include <setjmp.h>
- #include "sdk_common.h"
- #include "SEGGER_RTT.h"
- #include "usr_config.h"
- #pragma pack(push, 1)
- typedef struct {
- signed int Sine1;
- signed int Sine2;
- signed int Sine3;
- signed int Sine4;
- signed int Sine5;
- signed int Sine6;
- }acValBuffer_t;
- #pragma pack(pop)
- #define CHECK_TIMECONSUMING_START uint32_t cnt1 = 0, cnt2 = 0; \
- static char string[100]; \
- cnt1 = NRF_RTC0->COUNTER
- #define CHECK_TIMECONSUMING_END cnt2 = NRF_RTC0->COUNTER; \
- sprintf(string,"=====>time consuming:%02f us\r\n",(cnt2-cnt1)/32.768 * 1000); \
- DEBUG_LOG("%s",string)
- extern acValBuffer_t acValBuffer;
- void JS_RTT_Init(void);
- void JS_RTT_Print(signed int Sine1,signed int Sine2,signed int Sine3);
- void JS_RTT_Print_06(signed int Sine1,signed int Sine2,signed int Sine3,signed int Sine4,signed int Sine5,signed int Sine6);
- float32_t CoefficientVariation(double *p_array, uint32_t len);
- void Tool_Init(void);
- #endif
|