1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
|
#include <string.h>
typedef struct
{
unsigned char jour[2];
unsigned char mois[2];
unsigned char annee[2];
unsigned char heure[2];
unsigned char minute[2];
unsigned char seconde[2];
}
DATE;
static int f (DATE * DateSyst)
{
unsigned char ucEmissMessage[100];
memcpy (ucEmissMessage + 63, DateSyst->annee, 2);
memcpy (ucEmissMessage + 65, DateSyst->mois, 2);
memcpy (ucEmissMessage + 67, DateSyst->jour, 2);
return 0;
}
int main (void)
{
DATE DateSyst[] =
{
"01",
"23",
"45",
"67",
"89",
"01",
};
f (&DateSyst);
return 0;
} |
Partager