File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6767#define HALP_LOW_STUB_SIZE_IN_PAGES 3
6868#endif
6969
70- /* Conversion functions */
71- #define BCD_INT (bcd ) \
72- (((bcd & 0xF0) >> 4) * 10 + (bcd & 0x0F))
73- #define INT_BCD (int ) \
74- (UCHAR)(((int / 10) << 4) + (int % 10))
70+ FORCEINLINE
71+ UCHAR
72+ BCD_INT (
73+ _In_ UCHAR Bcd )
74+ {
75+ return ((Bcd & 0xF0 ) >> 4 ) * 10 + (Bcd & 0x0F );
76+ }
77+
78+ FORCEINLINE
79+ UCHAR
80+ INT_BCD (
81+ _In_ CSHORT Int )
82+ {
83+ return ((Int / 10 ) << 4 ) + (Int % 10 );
84+ }
7585
7686typedef
7787BOOLEAN
Original file line number Diff line number Diff line change @@ -33,26 +33,17 @@ static ULONG_PTR MappedNvram;
3333
3434/* PRIVATE FUNCTIONS *********************************************************/
3535
36- /* Avoid double calls */
37- #undef BCD_INT
38- static UCHAR
39- BCD_INT (
40- _In_ UCHAR Bcd )
41- {
42- return ((Bcd & 0xF0 ) >> 4 ) * 10 + (Bcd & 0x0F );
43- }
44-
45- static UCHAR
46- NTAPI
36+ static
37+ UCHAR
4738HalpReadNvram (
4839 _In_ UCHAR Register )
4940{
5041 return READ_REGISTER_UCHAR ((PUCHAR )(MappedNvram + Register ));
5142}
5243
5344_Requires_lock_held_ (HalpSystemHardwareLock )
54- static VOID
55- NTAPI
45+ static
46+ VOID
5647HalpWriteNvram (
5748 _In_ UCHAR Register ,
5849 _In_ UCHAR Value )
@@ -63,8 +54,8 @@ HalpWriteNvram(
6354}
6455
6556_Requires_lock_held_ (HalpSystemHardwareLock )
66- static UCHAR
67- NTAPI
57+ static
58+ UCHAR
6859HalpRtcReadByte (VOID )
6960{
7061 UCHAR i ;
@@ -86,8 +77,8 @@ HalpRtcReadByte(VOID)
8677}
8778
8879_Requires_lock_held_ (HalpSystemHardwareLock )
89- static VOID
90- NTAPI
80+ static
81+ VOID
9182HalpRtcWriteBit (
9283 _In_ UCHAR Bit )
9384{
@@ -101,8 +92,8 @@ HalpRtcWriteBit(
10192}
10293
10394_Requires_lock_held_ (HalpSystemHardwareLock )
104- static VOID
105- NTAPI
95+ static
96+ VOID
10697HalpRtcWriteCommand (
10798 _In_ UCHAR Command )
10899{
You can’t perform that action at this time.
0 commit comments