Révision 681
Ajouté par annoyau il y a presque 4 ans
branch/NOYAU/sp4c12/uart0/uart0/SessionM32C_E8a_SYSTEM.ini | ||
---|---|---|
Renesas Communications=USB interface,0,
|
||
[Target]
|
||
M32C E8a SYSTEM=Renesas Communications
|
||
[USER_DATA]
|
||
RESET=fe0000
|
branch/NOYAU/sp4c12/uart0/uart0/uart0.c | ||
---|---|---|
/* This file is generated by Renesas Project Generator (Ver.4.18). */
|
||
/* NOTE:THIS IS A TYPICAL EXAMPLE. */
|
||
/***********************************************************************/
|
||
#include "sfr32c87.h"
|
||
void uart0init(void);
|
||
void uart0_tx(void);
|
||
|
||
|
||
|
||
void main(void)
|
||
{
|
||
uart0init;
|
||
uart0_tx;
|
||
/* while (1)
|
||
{
|
||
uart0_tx('A');
|
||
} */
|
||
}
|
||
void uart0init (void)
|
||
{
|
||
|
||
u0mr = 0x05;
|
||
u0smr =0x00;
|
||
u0smr2 =0x00;
|
||
u0smr3 =0x00;
|
||
u0smr4 =0x00;
|
||
|
||
u0c0 = 0xD0;
|
||
u0brg = 0xFF;
|
||
u0c1 = 0x18;
|
||
s0tic = 0x00;
|
||
s0ric = 0x00;
|
||
pd6 = 0xFB;
|
||
p6 = 0x00;
|
||
|
||
psl0 = 0x08;
|
||
ps0 = 0x08;
|
||
u0c1 = 0x1D;
|
||
}
|
||
|
||
void uart0_tx (void)
|
||
{
|
||
u0tb = 0x05;
|
||
// u0tb = (c>>8)&(0x0F);
|
||
}
|
Formats disponibles : Unified diff
fonction uart init