#include <plib.h>
#include <stdlib.h>
#include <math.h>
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
§ _DISABLE_OPENADC10_CONFIGPORT_WARNING
| #define _DISABLE_OPENADC10_CONFIGPORT_WARNING |
§ _SUPPRESS_PLIB_WARNING
| #define _SUPPRESS_PLIB_WARNING 1 |
§ absfix16
| #define absfix16 |
( |
|
a | ) |
abs(a) |
§ ARRAY_LEN
| #define ARRAY_LEN |
( |
|
a | ) |
(sizeof(a)/sizeof(a[0])) |
§ DisablePullDownA
| #define DisablePullDownA |
( |
|
bits | ) |
CNPDACLR=bits; |
§ DisablePullDownB
| #define DisablePullDownB |
( |
|
bits | ) |
CNPDBCLR=bits; |
§ DisablePullUpA
| #define DisablePullUpA |
( |
|
bits | ) |
CNPUACLR=bits; |
§ DisablePullUpB
| #define DisablePullUpB |
( |
|
bits | ) |
CNPUBCLR=bits; |
§ divfix16
| #define divfix16 |
( |
|
a, |
|
|
|
b |
|
) |
| ((fix16)((((signed long long)(a)<<16)/(b)))) |
§ EnablePullDownA
| #define EnablePullDownA |
( |
|
bits | ) |
CNPUACLR=bits; CNPDASET=bits; |
§ EnablePullDownB
| #define EnablePullDownB |
( |
|
bits | ) |
CNPUBCLR=bits; CNPDBSET=bits; |
§ EnablePullUpA
| #define EnablePullUpA |
( |
|
bits | ) |
CNPDACLR=bits; CNPUASET=bits; |
§ EnablePullUpB
| #define EnablePullUpB |
( |
|
bits | ) |
CNPDBCLR=bits; CNPUBSET=bits; |
§ fix2float16
| #define fix2float16 |
( |
|
a | ) |
((float)(a)/65536.0) |
§ fix2int16
| #define fix2int16 |
( |
|
a | ) |
((int)((a)>>16)) |
§ float2fix16
| #define float2fix16 |
( |
|
a | ) |
((fix16)((a)*65536.0)) |
§ int2fix16
| #define int2fix16 |
( |
|
a | ) |
((fix16)((a)<<16)) |
§ multfix16
| #define multfix16 |
( |
|
a, |
|
|
|
b |
|
) |
| ((fix16)(((( signed long long)(a))*(( signed long long)(b)))>>16)) |
§ sqrtfix16
§ fix16