Revision 728 branch/BEN_MBAREK/sp4c12/SP4c1/SP4c1/uart0.c

View differences:

uart0.c
1
#include "sfr32c87.h"
2

  
3
main(void)
4
{
5
	
6
	
7
}
8
void uart0_init (void) 
9
	{
10
		u0mr = 0x05;
11
		u0smr = 0x00;
12
		u0c0 = 0x11;
13
		u0brg = 0x20;
14
		u0c1 = 0x00;
15
		pd6 = 0x18;     /*uniquement le bit ? utiliser et on garde la configuration qu'on a trouv? dans le UART1 c'est ? dire le poids fort*/
16
		ps0 = 0x08;
17
	}
18
		
19
void uart0_tx(char c)
20
	{
21
		while (
22
		
23
		
24
		
25
		

Also available in: Unified diff