some cleaning in pfc.h
This commit is contained in:
parent
779caa371f
commit
9ba216d1de
|
@ -248,6 +248,7 @@ typedef volatile struct
|
|||
sh7305_port_data_register_t PUDR;
|
||||
sh7305_port_data_register_t PVDR;
|
||||
|
||||
//Missing ports ?
|
||||
//sh7305_port_data_register_t PWDR;
|
||||
//sh7305_port_data_register_t PXDR;
|
||||
//sh7305_port_data_register_t PYDR;
|
||||
|
@ -262,19 +263,7 @@ typedef volatile struct
|
|||
sh7305_module_function_select_register_t MSELCRA;
|
||||
sh7305_module_function_select_register_t MSELCRB;
|
||||
|
||||
/*
|
||||
// PULL-UP CONTROL REGISTER (PULCR)
|
||||
word_union( PULCR,
|
||||
uint16_t PUL15 :1;
|
||||
uint16_t reserved : 15;
|
||||
);
|
||||
|
||||
// List of all IO BUFFER DRIVE CONTROL REGISTERS (DRVCRs)
|
||||
sh7305_IO_buffer_drive_control_register_t DRVCRA;
|
||||
sh7305_IO_buffer_drive_control_register_t DRVCRB;
|
||||
sh7305_IO_buffer_drive_control_register_t DRVCRC;
|
||||
|
||||
*/
|
||||
} sh7305_pfc_t;
|
||||
|
||||
#define SH7305_PFC (*((sh7305_pfc_t *)0xa4050100))
|
||||
|
|
|
@ -15,6 +15,8 @@ extern "C" {
|
|||
#include <gint/defs/call.h>
|
||||
|
||||
|
||||
// Prototypes of functions expected to appear in the serial module
|
||||
// aims at reproducing the OS syscalls
|
||||
|
||||
int gint_serial_read_one_byte(unsigned char *dest);
|
||||
|
||||
|
|
|
@ -34,41 +34,6 @@ int gint_serial_clear_transmit_buffer(void)
|
|||
|
||||
int gint_serial_open(unsigned char *conf)
|
||||
{
|
||||
SCIF.SCSCR.TE=0b0;
|
||||
SCIF.SCSCR.RE=0b0;
|
||||
SCIF.SCSCR.TIE=0b0;
|
||||
SCIF.SCSCR.RIE=0b0;
|
||||
|
||||
SCIF.SCFCR.TFRST=0b1;
|
||||
SCIF.SCFCR.RFRST=0b1;
|
||||
|
||||
SCIF.SCLCR.ORER=0b0;
|
||||
SCIF.SCFSR.ER=0b0;
|
||||
SCIF.SCFSR.DR=0b0;
|
||||
SCIF.SCFSR.BRK=0b0;
|
||||
|
||||
SCIF.SCSCR.CKE=0b01; //set to internal clock
|
||||
|
||||
SCIF.SCSMR.CA = 0b1; // clock synchronous mode
|
||||
SCIF.SCSMR.CHR = 0b0; // 8bits length for data
|
||||
SCIF.SCSMR.PE = 0b0; // Parity bit not set
|
||||
SCIF.SCSMR.OE = 0b0; // just cleared, no effect as no parity is set
|
||||
SCIF.SCSMR.STOP = 0b0; // not effect in synchronous mode
|
||||
SCIF.SCSMR.CKS = 0b00; // 00=Pphi, 01=Pphi/4, 10=Pphi/16, 11=Pphi/64
|
||||
|
||||
SCIF.SCFCR.RTRG = 0b11;
|
||||
SCIF.SCFCR.TTRG = 0b11;
|
||||
SCIF.SCFCR.RFRST = 0b0;
|
||||
SCIF.SCFCR.TFRST = 0b0;
|
||||
|
||||
//PFC setting for external pins used
|
||||
//SCK, TXD, RXD
|
||||
|
||||
SCIF.SCSCR.TE=0b1;
|
||||
SCIF.SCSCR.RE=0b1;
|
||||
SCIF.SCSCR.TIE=0b1;
|
||||
SCIF.SCSCR.RIE=0b1;
|
||||
SCIF.SCSCR.REIE=0b1;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue