root/branch/sabot/sp4abc/sp4c12/uart0/uart0/uart0.c @ 771
| 688 | chsabot | /***********************************************************************/
|
|
/* */
|
|||
/* FILE :uart0.c */
|
|||
/* DATE :Tue, Jun 01, 2021 */
|
|||
/* DESCRIPTION :main program file. */
|
|||
/* CPU GROUP :87B */
|
|||
/* */
|
|||
/* This file is generated by Renesas Project Generator (Ver.4.18). */
|
|||
/* NOTE:THIS IS A TYPICAL EXAMPLE. */
|
|||
/***********************************************************************/
|
|||
#include "sfr32c87.h"
|
|||
#include "stdio.h"
|
|||
void uart0_init(void){
|
|||
//initialisation registre u0mr
|
|||
smd0_u0mr=1;
|
|||
smd1_u0mr=0;
|
|||
smd2_u0mr=1;
|
|||
ckdir_u0mr=0;
|
|||
stps_u0mr=1;
|
|||
pry_u0mr=1;
|
|||
iopol_u0mr=0;
|
|||
//initialisation u0smr
|
|||
u0smr=0x00;
|
|||
u0smr2=0x00;
|
|||
u0smr3=0x00;
|
|||
u0smr4=0x00;
|
|||
//initialisation registre u0c0
|
|||
crd_u0c0=0;
|
|||
crs_u0c0=0;
|
|||
clk0_u0c0=0;
|
|||
clk1_u0c0=0;
|
|||
txept_u0c0=0;
|
|||
nch_u0c0=0;
|
|||
uform_u0c0=0;
|
|||
ckpol_u0c0=0;
|
|||
//initialisation registre u0bre
|
|||
u0brg=255;
|
|||
//initialisation registre u0c1
|
|||
u0c1=0x00&u0c1;//mettre le bit 7 ? 0
|
|||
te_u0c1=0;
|
|||
re_u0c1=0;
|
|||
u0rrm_u0c1=0;
|
|||
}
|
|||
void main(void)
|
|||
{
|
|||
char c;
|
|||
c='c';
|
|||
uart0_init();
|
|||
te_u0c1=1;
|
|||
ti_u0c1=0;
|
|||
pd6_1=0;
|
|||
pd6_2=0;
|
|||
psl0_0=0;
|
|||
psl0_3=0;
|
|||
ps0_0=1;
|
|||
ps0_1=0;
|
|||
ps0_2=0;
|
|||
ps0_3=1;
|
|||
if(crd_u0c0==0 & crs_u0c0==0){
|
|||
pd6_0=0;
|
|||
}
|
|||
u0tb='c';
|
|||
}
|