Sign in
android
/
platform
/
hardware
/
google
/
apf
/
refs/heads/aml_ext_341816020
/
.
/
apf_utils.h
blob: a95a94e6bd73ee5d49e71f70d5dd3b92dd8a9867 [
file
] [
log
] [
blame
] [
edit
]
static
u32 read_be16
(
const
u8
*
buf
)
{
return
buf
[
0
]
*
256u
+
buf
[
1
];
}
static
void
store_be16
(
u8
*
const
buf
,
const
u16 v
)
{
buf
[
0
]
=
(
u8
)(
v
>>
8
);
buf
[
1
]
=
(
u8
)
v
;
}
static
u8 uppercase
(
u8 c
)
{
return
(
c
>=
'a'
)
&&
(
c
<=
'z'
)
?
c
-
(
'a'
-
'A'
)
:
c
;
}