Projet

Général

Profil

« Précédent | Suivant » 

Révision 817

Ajouté par Faty MBAYE il y a presque 4 ans

Tpc2

Voir les différences:

uart0.c
/* NOTE:THIS IS A TYPICAL EXAMPLE. */
/***********************************************************************/
void uart0_init(void)
{
smd0_u0mr = 0b101; /* Serial I/O mode select bit */
smd1_u0mr = 0b101; /* Serial I/O mode select bit */
smd2_u0mr = 0b101; /* Serial I/O mode select bit */
ckdir_u0mr = 0; /* Internal/external clock select bit */
stps_u0mr = 0; /* Stop bit length select bit */
prye_u0mr = 1; /* Parity enable bit */
iopol_u0mr = 0; /* TxD RxD I/O polarity switch bit */
u0brg = 0x20;
}
void uart0_tx(char c)
{
crd_u0c0=0;
crs_u0c0=0;
te_u0c1=1;
ti_u0c1=0;
if(cts0
}
char uart0_rx(void)
{
re_u1c1=0;
ri_u1c1=1;
}

Formats disponibles : Unified diff