⚲
Projet
Général
Profil
Connexion
S'enregistrer
Accueil
Projets
Aide
Recherche
:
Polytech Ge Sous Traitance
Tous les projets
Polytech Projets Ge
»
Polytech Ge Sous Traitance
Aperçu
Activité
Roadmap
Demandes
Gantt
Calendrier
Annonces
Documents
Wiki
Fichiers
Dépôt
Télécharger (589 octets)
Feature #13528
» fonction-custom.c
Anonyme, 29/10/2021 15:27
void
printChar
(
uint8_t
in
,
uint8_t
out
[
2
])
{
if
((
in
>>
4
)
<
0xA
)
{
out
[
0
]
=
(
in
>>
4
)
+
'0'
;
}
else
{
out
[
0
]
=
(
in
>>
4
)
+
0x37
;
}
if
((
in
&
0x0F
)
<
0xA
)
{
out
[
1
]
=
(
in
&
0x0F
)
+
'0'
;
}
else
{
out
[
1
]
=
(
in
&
0x0F
)
+
0x37
;
}
}
void
printUint32
(
uint32_t
in
,
uint8_t
out
[
STIMESTAMP_SIZE
])
{
uint8_t
tmp
;
int8_t
i
;
uint8_t
j
=
0
;
for
(
i
=
3
;
i
>=
0
;
i
--
)
{
tmp
=
in
>>
(
i
<<
3
);
// in >> i*8
printChar
(
tmp
,
&
out
[
j
]);
j
+=
2
;
}
}
« Précédent
1
2
Suivant »
(1-1/2)
Chargement...