Choco OS  V.0.16.9.0
Join to the chocolate world
oc_frequency.h
Go to the documentation of this file.
1 
26 #ifndef SYSTEM_LIBRARIES_FREQUENCY_OC_FREQUENCY_H_
27 #define SYSTEM_LIBRARIES_FREQUENCY_OC_FREQUENCY_H_
28 
36 #include <stdint.h>
37 #include <oc_time.h>
38 
44 #define _________________________________________MACROS_SECTION_____________________________________________________________________________
45 
48 #define oC_GHz(X) ( (oC_Frequency_t)((X)*1000000000UL) )
49 #define oC_MHz(X) ( (oC_Frequency_t)((X)*1000000UL) )
50 #define oC_kHz(X) ( (oC_Frequency_t)((X)*1000UL) )
51 #define oC_Hz(X) ( (oC_Frequency_t)((X)*1UL) )
52 
53 #define oC_Frequency_ToTime(Frequency) ((oC_Time_t) (1/Frequency))
54 
55 #define oC_Frequency_FromTime(Time) ( (oC_Frequency_t) (1/Time) )
56 
57 #undef _________________________________________MACROS_SECTION_____________________________________________________________________________
58 
65 #define _________________________________________TYPES_SECTION______________________________________________________________________________
66 
69 //==========================================================================================================================================
75 //==========================================================================================================================================
76 typedef double oC_Frequency_t;
77 
78 #undef _________________________________________TYPES_SECTION______________________________________________________________________________
79 
86 #define _________________________________________STATIC_INLINE_SECTION______________________________________________________________________
87 
90 
91 
92 #undef _________________________________________STATIC_INLINE_SECTION______________________________________________________________________
93 
95 
96 #endif /* SYSTEM_LIBRARIES_FREQUENCY_OC_FREQUENCY_H_ */
double oC_Frequency_t
type to store frequency
Definition: oc_frequency.h:76
The library with time definitions.