The old types.h is deprecated and not used by sysless itself now.
If the standard C99 stdint.h is missing in the build environment,
change the compiler.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
#ifndef _SYSTEM_STUB_H_
#define _SYSTEM_STUB_H_
-#include <types.h>
+#include <stdint.h>
typedef struct system_stub_ops_t {
int (*open)(const char * path, int flags, ...);
#include <cpu_def.h>
#include <hal_ints.h>
#include <hal_intr.h>
-#include <types.h>
+#include <stdint.h>
// -------------------------------------------------------------------------
// Hardware init
#include <system_def.h>
#include <hal_ints.h>
#include <hal_intr.h>
-#include <types.h>
+#include <stdint.h>
// -------------------------------------------------------------------------
// Hardware init
#ifndef _LT_TIMER_H
#define _LT_TIMER_H
-#include <types.h>
+#include <stdint.h>
#include <lt_timer_types.h>
#include <cpu_def.h>
/* procesor H8S/2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <mcu_regs.h>
//#include <periph/chmod_lcd.h>
int main()
{
- __u8 *p;
+ uint8_t *p;
_setup_board(); /* Provided in bspbase library of each board */
- p=(__u8*)&deb_wr_hex;
+ p=(uint8_t*)&deb_wr_hex;
if(p>=IRAM_START) p=" IRAM";
#ifdef SRAM_START
else if(p>=SRAM_START) p=" SRAM";
#ifdef XRAM_START
else if(p>=XRAM_START) p=" XRAM";
#endif
- else if(p>(__u8*)0x4000l) p=" FLSHU";
+ else if(p>(uint8_t*)0x4000l) p=" FLSHU";
else p=" FLSHB";
*******************************************************************/
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
//#include <h8s2633h.h>
#include <mcu_regs.h>
#endif
-__u8 test_buf_tx[TEST_BUF]={0x10,0x11,0x22,0x33};
-__u8 test_buf_rx[TEST_BUF];
+uint8_t test_buf_tx[TEST_BUF]={0x10,0x11,0x22,0x33};
+uint8_t test_buf_rx[TEST_BUF];
int test_callback(struct iic_ifc *ifc, int code, struct iic_msg_head *msg);
unsigned t_mkbd_cnt=0;
-__u8 t_mkbd_buf_tx[TEST_BUF];
-__u8 t_mkbd_buf_rx[TEST_BUF];
+uint8_t t_mkbd_buf_tx[TEST_BUF];
+uint8_t t_mkbd_buf_rx[TEST_BUF];
int t_mkbd_callback(struct iic_ifc *ifc, int code, struct iic_msg_head *msg);
int t_mkbd_callback(struct iic_ifc *ifc, int code, struct iic_msg_head *msg)
{
unsigned u,v;
- __u8 *p;
+ uint8_t *p;
if(code==IIC_MSG_CB_PROC) return test_callback(ifc, code, msg);
switch(code){
}
-int test_rd_arr(char **ps, __u8 *buf, int n)
+int test_rd_arr(char **ps, uint8_t *buf, int n)
{
long val;
int c;
*******************************************************************/
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <mcu_regs.h>
#include <system_def.h>
static int iicx_sfnc_default(struct iic_ifc *ifc, int code)
{
iic_msg_head_t *msg;
- __u8 v_icsr;
+ uint8_t v_icsr;
ifc->msg_act=NULL;
v_icsr=*IIC_ICSR;
static int iicx_sfnc_ms_tx(struct iic_ifc *ifc, int code)
{
iic_msg_head_t *msg=ifc->msg_act;
- __u8 v_icsr;
+ uint8_t v_icsr;
unsigned saveif;
/* mstx[8] Test for acknowledgement by the designated slave device. */
/* mstx[7] IRQ after wait for 1 byte to be transmitted. */
static int iicx_sfnc_ms_rx(struct iic_ifc *ifc, int code)
{
- __u8 dummy;
- __u8 v_icsr;
+ uint8_t dummy;
+ uint8_t v_icsr;
unsigned saveif;
iic_msg_head_t *msg=ifc->msg_act;
void iicx_isr(void)
{
- __u8 c;
+ uint8_t c;
int ret;
iic_ifc_t *ifc=&iicx_ifc;
#endif
-__u8 test_buf_tx[TEST_BUF]={0x10,0x11,0x22,0x33};
-__u8 test_buf_rx[TEST_BUF];
+uint8_t test_buf_tx[TEST_BUF]={0x10,0x11,0x22,0x33};
+uint8_t test_buf_rx[TEST_BUF];
int test_callback(struct iic_ifc *ifc, int code, struct iic_msg_head *msg);
unsigned t_mkbd_cnt=0;
-__u8 t_mkbd_buf_tx[TEST_BUF];
-__u8 t_mkbd_buf_rx[TEST_BUF];
+uint8_t t_mkbd_buf_tx[TEST_BUF];
+uint8_t t_mkbd_buf_rx[TEST_BUF];
int t_mkbd_callback(struct iic_ifc *ifc, int code, struct iic_msg_head *msg);
int t_mkbd_callback(struct iic_ifc *ifc, int code, struct iic_msg_head *msg)
{
unsigned u,v;
- __u8 *p;
+ uint8_t *p;
if(code==IIC_MSG_CB_PROC) return test_callback(ifc, code, msg);
switch(code){
}
-int test_rd_arr(char **ps, __u8 *buf, int n)
+int test_rd_arr(char **ps, uint8_t *buf, int n)
{
long val;
int c;
int cmd_do_iicstat(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
{
- __u8 v_iccr, v_icsr;
+ uint8_t v_iccr, v_icsr;
int opchr=*param[2];
char *p=param[3];
char s[10];
- volatile __u8 *pb;
+ volatile uint8_t *pb;
long val;
unsigned short saveif;
#define IIC_MSG_CB_PROC 0x400
typedef struct iic_msg_head {
- __u16 flags; /* message flags */
- __u8 sl_cmd; /* command for slave queue lookup */
- __u8 sl_msk; /* sl_cmd match mask */
- __u16 addr; /* message destination address */
- __u16 tx_rq; /* requested TX transfer length */
- __u16 rx_rq; /* requested RX transfer length */
- __u16 tx_len; /* finished TX transfer length */
- __u16 rx_len; /* finished RX transfer length */
- __u8 *tx_buf; /* pointer to TX data */
- __u8 *rx_buf; /* pointer to RX data */
+ uint16_t flags; /* message flags */
+ uint8_t sl_cmd; /* command for slave queue lookup */
+ uint8_t sl_msk; /* sl_cmd match mask */
+ uint16_t addr; /* message destination address */
+ uint16_t tx_rq; /* requested TX transfer length */
+ uint16_t rx_rq; /* requested RX transfer length */
+ uint16_t tx_len; /* finished TX transfer length */
+ uint16_t rx_len; /* finished RX transfer length */
+ uint8_t *tx_buf; /* pointer to TX data */
+ uint8_t *rx_buf; /* pointer to RX data */
struct iic_msg_head *prev;
struct iic_msg_head *next;
struct iic_msg_head **on_queue;
#define IIC_IFC_ON 1
typedef struct iic_ifc {
- __u8 flags;
- __u16 self_addr;
+ uint8_t flags;
+ uint16_t self_addr;
iic_msg_head_t *master_queue;
iic_msg_head_t *slave_queue;
iic_msg_head_t *proc_queue;
#define m_BRR()
typedef struct{
- __u8 *buf_beg; //start of adress structur
- __u8 *buf_end; //end of adress structur - beg+sizeof(struct)
- __u8 *ip; //actual position at queue
- __u8 *op; //position first unread char of queue
+ uint8_t *buf_beg; //start of adress structur
+ uint8_t *buf_end; //end of adress structur - beg+sizeof(struct)
+ uint8_t *ip; //actual position at queue
+ uint8_t *op; //position first unread char of queue
} sci_que_t;
typedef struct sci_info {
/* Queues */
sci_que_t sci_rs232_que_in;
sci_que_t sci_rs232_que_out;
- __u8 *sci_rs232_buf_in;
+ uint8_t *sci_rs232_buf_in;
int sci_rs232_buf_in_size;
- __u8 *sci_rs232_buf_out;
+ uint8_t *sci_rs232_buf_out;
int sci_rs232_buf_out_size;
} sci_info_t;
*******************************************************************/
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <mcu_regs.h>
#include <system_def.h>
/* put character c into queue, if full return -1 */
inline int sci_que_put(sci_que_t *q, int c)
{
- __u8 *p;
+ uint8_t *p;
p=q->ip;
*(p++)=c;
if(p==q->buf_end) p=q->buf_beg;
/* get character from queue, if empty return -1 */
inline int sci_que_get(sci_que_t *q)
{
- __u8 *p;
+ uint8_t *p;
int c;
p=q->op;
if(p==q->ip) return -1;
/*return free space in queue*/
inline int sci_que_freecnt(sci_que_t *q)
{
- __u8 *ip=q->ip,*op=q->op;
+ uint8_t *ip=q->ip,*op=q->op;
return op-ip-1+(op<=ip?q->buf_end-q->buf_beg:0);
}
inline int sci_que_incnt(sci_que_t *q)
{
- __u8 *ip=q->ip,*op=q->op;
+ uint8_t *ip=q->ip,*op=q->op;
return ip-op+(ip<op?q->buf_end-q->buf_beg:0);
}
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <mcu_regs.h>
#include <system_def.h>
unsigned long reloc_offs=where-(unsigned long)&__boot_fn_start;
size_t reloc_size=&__boot_fn_end-&__boot_fn_start;
ProgMode_ptr=&ProgMode;
- (__u8*)ProgMode_ptr+=reloc_offs;
+ (uint8_t*)ProgMode_ptr+=reloc_offs;
memcpy((char*)where,&__boot_fn_start,reloc_size);
(*ProgMode_ptr)(baud);
}
{
SCIInit(HIT_LOAD_BAUD);
- if((__u8*)&__boot_fn_start<(__u8*)0xff0000)
+ if((uint8_t*)&__boot_fn_start<(uint8_t*)0xff0000)
RelocatedProgMode(0xffb000,HIT_LOAD_BAUD);
else
ProgMode(HIT_LOAD_BAUD);
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <system_def.h>
//#include <h8s2633h.h>
#ifdef WITH_EXTERNAL_FLASH
#define EXTERNAL_FLASH_START 0x40000
#define EXTERNAL_FLASH_END (0x40000+0xfffff)
- int ExtFlProgRow(__u8 *addr, __u8 *data);
- int ExtFlErase(__u8 *addr);
+ int ExtFlProgRow(uint8_t *addr, uint8_t *data);
+ int ExtFlErase(uint8_t *addr);
#endif /*WITH_EXTERNAL_FLASH*/
/* Check if block number is blank */
int FlTest(int bl)
{
- __u16 *p, *pe;
+ uint16_t *p, *pe;
unsigned long *blocks;
blocks = &flash_blocks[0];
/* No software control over Flash/External select */
/* *BCRL=(*BCRL & (EAE ^ 0x0ff)); */
- p=(__u16*)blocks[bl];
- pe=(__u16*)blocks[bl+1];
+ p=(uint16_t*)blocks[bl];
+ pe=(uint16_t*)blocks[bl+1];
while(p<pe){
*p=0xffff;
FlWait(2);
}
/* Program data to address */
-int FlProgRow(__u8 *adr, __u8 *data)
+int FlProgRow(uint8_t *adr, uint8_t *data)
{
- __u8 prog_data[FLASH_ROW];
+ uint8_t prog_data[FLASH_ROW];
int i;
int m;
int n;
- __u8 *x;
- __u8 c,d;
+ uint8_t *x;
+ uint8_t c,d;
if((unsigned long)adr & (FLASH_ROW-1)) return -EBOOT_ROW_BEGIN;
if((*FLM_FLMCR1 & FLMCR1_FWEm)==0 ) return -EBOOT_NO_FWE;
#ifdef WITH_EXTERNAL_FLASH
- if(((__u32)adr>=EXTERNAL_FLASH_START)&&
- ((__u32)adr<=EXTERNAL_FLASH_END)){
+ if(((uint32_t)adr>=EXTERNAL_FLASH_START)&&
+ ((uint32_t)adr<=EXTERNAL_FLASH_END)){
return ExtFlProgRow(adr,data);
}
#endif /*WITH_EXTERNAL_FLASH*/
i=0;
x=adr;
for(i=0;i<FLASH_ROW;i+=2,x+=2){
- *(__u16*)x=0xffff;
+ *(uint16_t*)x=0xffff;
FlWait(2); /*epsilon*/
- *(__u16*)(prog_data+i)=*(__u16*)x;
+ *(uint16_t*)(prog_data+i)=*(uint16_t*)x;
}
*FLM_FLMCR1&=FLMCR1_SWE1m; /*clear PV1*/
FlWait(2); /*ny*/
if(c!=d) {
m=1; /* Reprogram needed */
/* DEB_BLOG(0xEE000000+(long)x); */
- /* DEB_BLOG(0xEF000000+(__u16)(c<<8)+(__u8)d); */
+ /* DEB_BLOG(0xEF000000+(uint16_t)(c<<8)+(uint8_t)d); */
}
*x=d|c;
prog_data[i]=d|~c;
#define EXTFL_manid 1
#define EXTFL_devid 0x2258
-#define FLASH_WR16(addr,val) (*(volatile __u16*)(addr)=(val))
-#define FLASH_RD16(addr) (*(volatile __u16*)(addr))
+#define FLASH_WR16(addr,val) (*(volatile uint16_t*)(addr)=(val))
+#define FLASH_RD16(addr) (*(volatile uint16_t*)(addr))
/* Program data to address */
-int ExtFlProgRow(__u8 *addr, __u8 *data)
+int ExtFlProgRow(uint8_t *addr, uint8_t *data)
{
/*FLASH_ROW*/;
int ret=0;
int cnt=FLASH_ROW/2;
- __u16 old,new,val;
- __u32 a=(__u32)addr&~EXTFL_addr_mask;
+ uint16_t old,new,val;
+ uint32_t a=(uint32_t)addr&~EXTFL_addr_mask;
while(cnt--){
- val=*((__u16*)data)++;
+ val=*((uint16_t*)data)++;
/* security sequence */
FLASH_WR16(a+EXTFL_reg1_addr,EXTFL_cmd_unlock1);
FlWait(2);
FLASH_WR16(a,EXTFL_cmd_reset);
FlWait(2);
if(FLASH_RD16(addr)!=val) return -EBOOT_EXT_FLASH_VERIFY;
- ((__u16*)addr)++;
+ ((uint16_t*)addr)++;
}
return 0;
}
-int ExtFlErase(__u8 *addr)
+int ExtFlErase(uint8_t *addr)
{
- __u16 old,new;
+ uint16_t old,new;
int ret=0;
- __u32 a=(__u32)addr&~EXTFL_addr_mask;
+ uint32_t a=(uint32_t)addr&~EXTFL_addr_mask;
/* security sequence */
FLASH_WR16(a+EXTFL_reg1_addr,EXTFL_cmd_unlock1);
FlWait(2);
FLASH_WR16(a+EXTFL_reg2_addr,EXTFL_cmd_unlock2);
FlWait(2);
/* select erase range */
- a=(__u32)addr;
+ a=(uint32_t)addr;
FLASH_WR16(a+EXTFL_reg1_addr,EXTFL_erase_all);
FlWait(2);
old=FLASH_RD16(addr);
j=0;
break;
}
- DEB_BLOG(0xEA000000|(__u32)adr|((__u8)j&0x7f));
+ DEB_BLOG(0xEA000000|(uint32_t)adr|((uint8_t)j&0x7f));
DEB_WR_HEX(j,2); /*!!!*/
adr+=FLASH_ROW;
j=0;
else SCISend(0xFF);
#ifdef WITH_EXTERNAL_FLASH
}else if(c==100){
- if(ExtFlErase((__u8*)EXTERNAL_FLASH_START)==0)
+ if(ExtFlErase((uint8_t*)EXTERNAL_FLASH_START)==0)
SCISend(0x5A); else SCISend(0xFF);
#endif /*WITH_EXTERNAL_FLASH*/
}else SCISend(0xFE);
#ifndef _boot_fn_H
#define _boot_fn_H
-#include <types.h>
+#include <stdint.h>
/* Size of a flash row */
#define FLASH_ROW 128
void wdg_clear();
int FlTest(int bl);
int FlErase(int bl);
-int FlProgRow(__u8 *adr, __u8 *data);
+int FlProgRow(uint8_t *adr, uint8_t *data);
int SCIAutoBaud(void);
int SCIInit(unsigned baud);
volatile int SCISend(unsigned char c);
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <system_def.h>
//#include <h8s2633h.h>
void *excptvec_get(int vectnum)
{
- __u32 *pvect;
- pvect=(__u32*)((__u32)(vectnum<<2)+0);
+ uint32_t *pvect;
+ pvect=(uint32_t*)((uint32_t)(vectnum<<2)+0);
return (void*)*pvect;
}
void *excptvec_set(int vectnum,void *vect)
{
- __u32 *pvect;
+ uint32_t *pvect;
void *ovect;
- pvect=(__u32*)((__u32)(vectnum<<2)+0);
+ pvect=(uint32_t*)((uint32_t)(vectnum<<2)+0);
ovect=(void*)*pvect;
- *pvect=(__u32)vect;
+ *pvect=(uint32_t)vect;
return ovect;
}
int excptvec_initfill(void *fill_vect, int force_all)
{
- __u32 *pvect;
+ uint32_t *pvect;
int i;
- __u32 l;
+ uint32_t l;
#ifdef CONFIG_USE_EXR_LEVELS
*SYS_SYSCR = *SYS_SYSCR | 1*SYSCR_INTM1m;
}
for(i=0,pvect=0;i<128;i++,pvect++){
- l=(__u32)*pvect;
+ l=(uint32_t)*pvect;
if((l==0)||(l==0xffffffff)||force_all)
- *pvect=(__u32)fill_vect;
+ *pvect=(uint32_t)fill_vect;
}
return 0;
*******************************************************************/
-#include <types.h>
+#include <stdint.h>
#include <system_def.h>
#include <sys/stat.h>
#include <cpu_def.h>
#ifndef __ASSEMBLY__
-#include <types.h>
+#include <stdint.h>
-#define __PORT8 (volatile __u8 * const)
-#define __PORT16 (volatile __u16 * const)
-#define __PORT32 (volatile __u32 * const)
+#define __PORT8 (volatile uint8_t * const)
+#define __PORT16 (volatile uint16_t * const)
+#define __PORT32 (volatile uint32_t * const)
#else /* __ASSEMBLY__ */
#define __PORT8
#ifndef _SCI_REGS_H
#define _SCI_REGS_H
-#include <types.h>
+#include <stdint.h>
struct sci_regs {
- volatile __u8 rs232_smr;
- volatile __u8 rs232_brr;
- volatile __u8 rs232_scr;
- volatile __u8 rs232_tdr;
- volatile __u8 rs232_ssr;
- volatile __u8 rs232_rdr;
- volatile __u8 rs232_scmr;
+ volatile uint8_t rs232_smr;
+ volatile uint8_t rs232_brr;
+ volatile uint8_t rs232_scr;
+ volatile uint8_t rs232_tdr;
+ volatile uint8_t rs232_ssr;
+ volatile uint8_t rs232_rdr;
+ volatile uint8_t rs232_scmr;
};
#ifndef __ASSEMBLY__
-#include <types.h>
+#include <stdint.h>
-#define __PORT8 (volatile __u8 * const)
-#define __PORT16 (volatile __u16 * const)
-#define __PORT32 (volatile __u32 * const)
+#define __PORT8 (volatile uint8_t * const)
+#define __PORT16 (volatile uint16_t * const)
+#define __PORT32 (volatile uint32_t * const)
#else /* __ASSEMBLY__ */
#define __PORT8
#ifndef _SCI_REGS_H
#define _SCI_REGS_H
-#include <types.h>
+#include <stdint.h>
struct sci_regs {
- volatile __u8 rs232_smr;
- volatile __u8 rs232_brr;
- volatile __u8 rs232_scr;
- volatile __u8 rs232_tdr;
- volatile __u8 rs232_ssr;
- volatile __u8 rs232_rdr;
- volatile __u8 rs232_scmr;
+ volatile uint8_t rs232_smr;
+ volatile uint8_t rs232_brr;
+ volatile uint8_t rs232_scr;
+ volatile uint8_t rs232_tdr;
+ volatile uint8_t rs232_ssr;
+ volatile uint8_t rs232_rdr;
+ volatile uint8_t rs232_scmr;
};
#ifndef __ASSEMBLER__
-#include <types.h>
+#include <stdint.h>
#endif
/* SAM-- shift and mask */
*******************************************************************/
-#include <types.h>
+#include <stdint.h>
#include <system_def.h>
#include <sim.h>
#include <qsm.h>
*******************************************************************/
-#include <types.h>
+#include <stdint.h>
#include <system_def.h>
#include <sim.h>
#include <tpu.h>
*******************************************************************/
-#include <types.h>
+#include <stdint.h>
#include <system_def.h>
#include <sim.h>
#include <tpu.h>
*******************************************************************/
-#include <types.h>
+#include <stdint.h>
#include <system_def.h>
#include <sim.h>
#include <tpu.h>
*******************************************************************/
-#include <types.h>
+#include <stdint.h>
#include <system_def.h>
#include <sys/stat.h>
#include <errno.h>
*******************************************************************/
-#include <types.h>
+#include <stdint.h>
#include <system_def.h>
#include <sim.h>
#include <qsm.h>
/*extern "C" {*/
#endif
-#include <types.h>
+#include <stdint.h>
int flash_erase(void *base,int size);
int flash_copy(void *des,const void *src,int len);
#ifndef _MSC_ADC_H
#define _MSC_ADC_H
-#include <types.h>
+#include <stdint.h>
#define MSC_ADC_LSB_BIPOLAR 298.0232e-9
#define MSC_ADC_LSB_UNIPOLAR 149.0116e-9
/*extern "C" {*/
#endif
-#include <types.h>
+#include <stdint.h>
#if !defined(SDCC_MODEL_LARGE) || !defined(SDCC)
#define MSC_FNC_REENTRANT
-#include <types.h>
+#include <stdint.h>
#include <system_def.h>
#include <string.h>
#include <stdio.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#include <system_stub.h>
#include <LPC17xx.h>
#include <bspbase.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#include <system_stub.h>
#include <LPC17xx.h>
#include <bspbase.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#include <system_stub.h>
#include <LPC17xx.h>
#include <bspbase.h>
#ifndef _BSPBASE_H
#define _BSPBASE_H
-#include <types.h>
+#include <stdint.h>
#include <lt_timer_types.h>
extern volatile lt_ticks_t sys_timer_ticks;
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#include <system_stub.h>
#include <LPC210x.h>
#include <bspbase.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#include <system_stub.h>
#include <LPC210x.h>
#include <bspbase.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#include <system_stub.h>
#include <LPC214x.h>
#include <bspbase.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#include <system_stub.h>
#include <LPC214x.h>
#include <bspbase.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#include <system_stub.h>
#include <LPC214x.h>
#include <bspbase.h>
#ifndef _BSPBASE_H
#define _BSPBASE_H
-#include <types.h>
+#include <stdint.h>
#include <lt_timer_types.h>
extern volatile lt_ticks_t sys_timer_ticks;
#ifndef _BSPBASE_H
#define _BSPBASE_H
-#include <types.h>
+#include <stdint.h>
#include <lt_timer_types.h>
lt_ticks_t get_sys_timer_ticks(void);
-#include <types.h>
+#include <stdint.h>
#include <lt_timer_types.h>
#include <bspbase.h>
#include <sys/time.h>
--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" = `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or parent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+# -*- makefile -*-
+
+ifneq ($(wildcard $(SOURCES_DIR)/$(BOARD)),)
+SUBDIRS = $(BOARD)
+endif
\ No newline at end of file
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#define WITH_SFI_SEL
#define SCI_RS232_CHAN_DEFAULT 1
/* XRAM 0.5 MB (CS0) */
-#define XRAM_START (volatile __u8 * const)(0x040000)
+#define XRAM_START (volatile uint8_t * const)(0x040000)
#define XRAM_SUPPORT_ENABLED
/* 0xffd000-0xffdfff .. 4 kB for Flash emulation */
/* 0xffe000-0xffffc0 .. 4 kB - 64 B free*/
/* 0xffffc0-0xffffff .. 64 B free*/
-#define IRAM_START (volatile __u8 * const)(0xffb000)
-#define IRAM_START1 (volatile __u8 * const)(0xffe000)
-#define FRAM_START (volatile __u8 * const)(0xffffc0)
+#define IRAM_START (volatile uint8_t * const)(0xffb000)
+#define IRAM_START1 (volatile uint8_t * const)(0xffe000)
+#define FRAM_START (volatile uint8_t * const)(0xffffc0)
/* SCI0 - RS232 */
/* SCI1 - RS232 / Boot */
#define SHADOW_REG_WR(_reg,_val) \
(*(_reg)=_reg##_shadow=(_val))
-__u8 DIO_P1DDR_shadow;
-__u8 DIO_P3DDR_shadow;
-__u8 DIO_PFDDR_shadow;
-__u8 DIO_PJDDR_shadow;
+uint8_t DIO_P1DDR_shadow;
+uint8_t DIO_P3DDR_shadow;
+uint8_t DIO_PFDDR_shadow;
+uint8_t DIO_PJDDR_shadow;
#define DEB_LED_INIT() \
do {\
/* procesor H8S/2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
#define SHADOW_SECT __attribute((section (".shadreg")))
-__u8 DIO_P1DDR_shadow SHADOW_SECT;
-__u8 DIO_P3DDR_shadow SHADOW_SECT;
-__u8 DIO_PFDDR_shadow SHADOW_SECT;
-__u8 DIO_PJDDR_shadow SHADOW_SECT;
+uint8_t DIO_P1DDR_shadow SHADOW_SECT;
+uint8_t DIO_P3DDR_shadow SHADOW_SECT;
+uint8_t DIO_PFDDR_shadow SHADOW_SECT;
+uint8_t DIO_PJDDR_shadow SHADOW_SECT;
/* procesor H8S/2638 board EDK2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#define WITH_SFI_SEL
volatile unsigned long msec_time;
/* Keyboard KL41 (CS3) */
-#define KL41_LCD_INST (volatile __u8 * const)(0x700000)
-#define KL41_LCD_STAT (volatile __u8 * const)(0x700001)
-#define KL41_LCD_WDATA (volatile __u8 * const)(0x700002)
-#define KL41_LCD_RDATA (volatile __u8 * const)(0x700003)
-#define KL41_LED_WR (volatile __u8 * const)(0x700001)
-#define KL41_KBD_WR (volatile __u8 * const)(0x700003)
-#define KL41_KBD_RD (volatile __u8 * const)(0x700004)
+#define KL41_LCD_INST (volatile uint8_t * const)(0x700000)
+#define KL41_LCD_STAT (volatile uint8_t * const)(0x700001)
+#define KL41_LCD_WDATA (volatile uint8_t * const)(0x700002)
+#define KL41_LCD_RDATA (volatile uint8_t * const)(0x700003)
+#define KL41_LED_WR (volatile uint8_t * const)(0x700001)
+#define KL41_KBD_WR (volatile uint8_t * const)(0x700003)
+#define KL41_KBD_RD (volatile uint8_t * const)(0x700004)
#define KL41_SUPPORT_ENABLED
/* SGM Small graphics LCD module 240x64 (CS3) */
-#define SGM_LCD_DATA (volatile __u8 * const)(0x700000)
-#define SGM_LCD_CMD (volatile __u8 * const)(0x700001)
-#define SGM_LCD_STAT (volatile __u8 * const)(0x700001)
+#define SGM_LCD_DATA (volatile uint8_t * const)(0x700000)
+#define SGM_LCD_CMD (volatile uint8_t * const)(0x700001)
+#define SGM_LCD_STAT (volatile uint8_t * const)(0x700001)
/* Keyboard on MO_KBD1 */
-#define SGM_KBDI (volatile __u8 * const)(0x700002)
-#define SGM_KBDO (volatile __u8 * const)(0x700002)
+#define SGM_KBDI (volatile uint8_t * const)(0x700002)
+#define SGM_KBDO (volatile uint8_t * const)(0x700002)
//#define SGM_SUPPORT_ENABLED
/* XRAM 1 MB (CS1) */
-#define XRAM_START (volatile __u8 * const)(0x200000)
+#define XRAM_START (volatile uint8_t * const)(0x200000)
#define XRAM_SUPPORT_ENABLED
/* SRAM 32 kB (CS3) */
-//#define SRAM_START (volatile __u8 * const)(0x610000)
+//#define SRAM_START (volatile uint8_t * const)(0x610000)
#if 1
#define ISR_USB_INTV EXCPTVEC_IRQ2 /* pin IRQ2 on PF.0 */
#define PDIUSB_TEST_IRQ() (!(*DIO_PORTF & 1))
-#define PDIUSB_READ_DATA_ADDR (volatile __u8 * const)(0x500000)
-#define PDIUSB_WRITE_DATA_ADDR (volatile __u8 * const)(0x500000)
-#define PDIUSB_COMMAND_ADDR (volatile __u8 * const)(0x500001)
+#define PDIUSB_READ_DATA_ADDR (volatile uint8_t * const)(0x500000)
+#define PDIUSB_WRITE_DATA_ADDR (volatile uint8_t * const)(0x500000)
+#define PDIUSB_COMMAND_ADDR (volatile uint8_t * const)(0x500001)
/* P1.0 .. DACK_N/DMACK0, P7.0 .. DMREQ/DREQ0, P7.2 .. EOT_N/TEND0 */
#undef PDIUSB_WITH_ADD_IRQ_HANDLER
/* IDE (CS4) (CS5) powered by PF2 */
-#define SIDE_START1 (volatile __u8 * const)(0x800000)
-#define SIDE_START2 (volatile __u8 * const)(0xA00000)
-#define IDE0_DATA (volatile __u16 * const)(SIDE_START1+0) /* DATA */
+#define SIDE_START1 (volatile uint8_t * const)(0x800000)
+#define SIDE_START2 (volatile uint8_t * const)(0xA00000)
+#define IDE0_DATA (volatile uint16_t * const)(SIDE_START1+0) /* DATA */
#define IDE0_ERROR (SIDE_START1+2) /* Error/Features RO/WO */
#define IDE0_NSECTOR (SIDE_START1+4) /* Sector Count R/W */
#define IDE0_SECTOR (SIDE_START1+6) /* SN, LBA 0-7 */
/* 0xffd000-0xffdfff .. 4 kB for Flash emulation */
/* 0xffe000-0xffffc0 .. 4 kB - 64 B free*/
/* 0xffffc0-0xffffff .. 64 B free*/
-#define IRAM_START (volatile __u8 * const)(0xffb000)
-#define IRAM_START1 (volatile __u8 * const)(0xffe000)
-#define FRAM_START (volatile __u8 * const)(0xffffc0)
+#define IRAM_START (volatile uint8_t * const)(0xffb000)
+#define IRAM_START1 (volatile uint8_t * const)(0xffe000)
+#define FRAM_START (volatile uint8_t * const)(0xffffc0)
/* SCI0 - IrDA */
/* SCI1 - IIC0 (P34, P35) */
#define SHADOW_REG_WR(_reg,_val) \
(*(_reg)=_reg##_shadow=(_val))
-__u8 DIO_P1DDR_shadow;
-__u8 DIO_P3DDR_shadow;
-__u8 DIO_PFDDR_shadow;
-__u8 DIO_PJDDR_shadow;
+uint8_t DIO_P1DDR_shadow;
+uint8_t DIO_P3DDR_shadow;
+uint8_t DIO_PFDDR_shadow;
+uint8_t DIO_PJDDR_shadow;
#define DEB_LED_INIT() \
do {\
/* procesor H8S/2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
#define SHADOW_SECT __attribute((section (".shadreg")))
-__u8 DIO_P1DDR_shadow SHADOW_SECT;
-__u8 DIO_P3DDR_shadow SHADOW_SECT;
-__u8 DIO_PFDDR_shadow SHADOW_SECT;
-__u8 DIO_PJDDR_shadow SHADOW_SECT;
+uint8_t DIO_P1DDR_shadow SHADOW_SECT;
+uint8_t DIO_P3DDR_shadow SHADOW_SECT;
+uint8_t DIO_PFDDR_shadow SHADOW_SECT;
+uint8_t DIO_PJDDR_shadow SHADOW_SECT;
/* procesor H8S/2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#define WITH_SFI_SEL
/* Buffer stransferred to second board power control register */
/* SRAM 32 kB (CS3) */
-//#define SRAM_START (volatile __u8 * const)(0x610000)
+//#define SRAM_START (volatile uint8_t * const)(0x610000)
#if 0
#define ISR_USB_INTV EXCPTVEC_IRQ2 /* pin IRQ2 on PF.0 */
-#define PDIUSB_READ_DATA_ADDR (volatile __u8 * const)(0x500000)
-#define PDIUSB_WRITE_DATA_ADDR (volatile __u8 * const)(0x500000)
-#define PDIUSB_COMMAND_ADDR (volatile __u8 * const)(0x500001)
+#define PDIUSB_READ_DATA_ADDR (volatile uint8_t * const)(0x500000)
+#define PDIUSB_WRITE_DATA_ADDR (volatile uint8_t * const)(0x500000)
+#define PDIUSB_COMMAND_ADDR (volatile uint8_t * const)(0x500001)
/* P1.0 .. DACK_N/DMACK0, P7.0 .. DMREQ/DREQ0, P7.2 .. EOT_N/TEND0 */
#undef PDIUSB_WITH_ADD_IRQ_HANDLER
#if 0
/* IDE (CS4) (CS5) powered by PF2 */
-#define SIDE_START1 (volatile __u8 * const)(0x800000)
-#define SIDE_START2 (volatile __u8 * const)(0xA00000)
-#define IDE0_DATA (volatile __u16 * const)(SIDE_START1+0) /* DATA */
+#define SIDE_START1 (volatile uint8_t * const)(0x800000)
+#define SIDE_START2 (volatile uint8_t * const)(0xA00000)
+#define IDE0_DATA (volatile uint16_t * const)(SIDE_START1+0) /* DATA */
#define IDE0_ERROR (SIDE_START1+2) /* Error/Features RO/WO */
#define IDE0_NSECTOR (SIDE_START1+4) /* Sector Count R/W */
#define IDE0_SECTOR (SIDE_START1+6) /* SN, LBA 0-7 */
/* 0xffd000-0xffdfff .. 4 kB for Flash emulation */
/* 0xffe000-0xffffc0 .. 4 kB - 64 B free*/
/* 0xffffc0-0xffffff .. 64 B free*/
-#define IRAM_START (volatile __u8 * const)(0xffb000)
-#define IRAM_START1 (volatile __u8 * const)(0xffe000)
-#define FRAM_START (volatile __u8 * const)(0xffffc0)
+#define IRAM_START (volatile uint8_t * const)(0xffb000)
+#define IRAM_START1 (volatile uint8_t * const)(0xffe000)
+#define FRAM_START (volatile uint8_t * const)(0xffffc0)
/* SCI0 - IrDA */
/* SCI1 - IIC0 (P34, P35) */
#define SHADOW_REG_WR(_reg,_val) \
(*(_reg)=_reg##_shadow=(_val))
-__u8 DIO_P1DDR_shadow;
-__u8 DIO_P3DDR_shadow;
-__u8 DIO_PADDR_shadow;
-__u8 DIO_PEDDR_shadow;
-__u8 DIO_PFDDR_shadow;
-__u8 DIO_PJDDR_shadow;
+uint8_t DIO_P1DDR_shadow;
+uint8_t DIO_P3DDR_shadow;
+uint8_t DIO_PADDR_shadow;
+uint8_t DIO_PEDDR_shadow;
+uint8_t DIO_PFDDR_shadow;
+uint8_t DIO_PJDDR_shadow;
#define DEB_LED_INIT() \
do {\
/* procesor H8S/2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
#define SHADOW_SECT __attribute((section (".shadreg")))
-__u8 DIO_P1DDR_shadow SHADOW_SECT;
-__u8 DIO_P3DDR_shadow SHADOW_SECT;
-__u8 DIO_PADDR_shadow SHADOW_SECT;
-__u8 DIO_PFDDR_shadow SHADOW_SECT;
-__u8 DIO_PJDDR_shadow SHADOW_SECT;
+uint8_t DIO_P1DDR_shadow SHADOW_SECT;
+uint8_t DIO_P3DDR_shadow SHADOW_SECT;
+uint8_t DIO_PADDR_shadow SHADOW_SECT;
+uint8_t DIO_PFDDR_shadow SHADOW_SECT;
+uint8_t DIO_PJDDR_shadow SHADOW_SECT;
/* procesor H8S/2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#define WITH_SFI_SEL
/* Buffer stransferred to second board power control register */
/* SRAM 32 kB (CS3) */
-//#define SRAM_START (volatile __u8 * const)(0x610000)
+//#define SRAM_START (volatile uint8_t * const)(0x610000)
#if 0
#define ISR_USB_INTV EXCPTVEC_IRQ2 /* pin IRQ2 on PF.0 */
-#define PDIUSB_READ_DATA_ADDR (volatile __u8 * const)(0x500000)
-#define PDIUSB_WRITE_DATA_ADDR (volatile __u8 * const)(0x500000)
-#define PDIUSB_COMMAND_ADDR (volatile __u8 * const)(0x500001)
+#define PDIUSB_READ_DATA_ADDR (volatile uint8_t * const)(0x500000)
+#define PDIUSB_WRITE_DATA_ADDR (volatile uint8_t * const)(0x500000)
+#define PDIUSB_COMMAND_ADDR (volatile uint8_t * const)(0x500001)
/* P1.0 .. DACK_N/DMACK0, P7.0 .. DMREQ/DREQ0, P7.2 .. EOT_N/TEND0 */
#undef PDIUSB_WITH_ADD_IRQ_HANDLER
#if 0
/* IDE (CS4) (CS5) powered by PF2 */
-#define SIDE_START1 (volatile __u8 * const)(0x800000)
-#define SIDE_START2 (volatile __u8 * const)(0xA00000)
-#define IDE0_DATA (volatile __u16 * const)(SIDE_START1+0) /* DATA */
+#define SIDE_START1 (volatile uint8_t * const)(0x800000)
+#define SIDE_START2 (volatile uint8_t * const)(0xA00000)
+#define IDE0_DATA (volatile uint16_t * const)(SIDE_START1+0) /* DATA */
#define IDE0_ERROR (SIDE_START1+2) /* Error/Features RO/WO */
#define IDE0_NSECTOR (SIDE_START1+4) /* Sector Count R/W */
#define IDE0_SECTOR (SIDE_START1+6) /* SN, LBA 0-7 */
/* 0xffd000-0xffdfff .. 4 kB for Flash emulation */
/* 0xffe000-0xffffc0 .. 4 kB - 64 B free*/
/* 0xffffc0-0xffffff .. 64 B free*/
-#define IRAM_START (volatile __u8 * const)(0xffb000)
-#define IRAM_START1 (volatile __u8 * const)(0xffe000)
-#define FRAM_START (volatile __u8 * const)(0xffffc0)
+#define IRAM_START (volatile uint8_t * const)(0xffb000)
+#define IRAM_START1 (volatile uint8_t * const)(0xffe000)
+#define FRAM_START (volatile uint8_t * const)(0xffffc0)
/* SCI0 - IrDA */
/* SCI1 - IIC0 (P34, P35) */
#define SHADOW_REG_WR(_reg,_val) \
(*(_reg)=_reg##_shadow=(_val))
-extern __u8 DIO_P1DDR_shadow;
-extern __u8 DIO_P3DDR_shadow;
-extern __u8 DIO_PCDDR_shadow;
-extern __u8 DIO_PEDDR_shadow;
-extern __u8 DIO_PFDDR_shadow;
-extern __u8 DIO_PJDDR_shadow;
+extern uint8_t DIO_P1DDR_shadow;
+extern uint8_t DIO_P3DDR_shadow;
+extern uint8_t DIO_PCDDR_shadow;
+extern uint8_t DIO_PEDDR_shadow;
+extern uint8_t DIO_PFDDR_shadow;
+extern uint8_t DIO_PJDDR_shadow;
#define DEB_LED_INIT() \
do {\
/* procesor H8S/2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
#define SHADOW_SECT __attribute((section (".shadreg")))
-__u8 DIO_P1DDR_shadow SHADOW_SECT;
-__u8 DIO_P3DDR_shadow SHADOW_SECT;
-__u8 DIO_PCDDR_shadow SHADOW_SECT;
-__u8 DIO_PEDDR_shadow SHADOW_SECT;
-__u8 DIO_PFDDR_shadow SHADOW_SECT;
-__u8 DIO_PJDDR_shadow SHADOW_SECT;
+uint8_t DIO_P1DDR_shadow SHADOW_SECT;
+uint8_t DIO_P3DDR_shadow SHADOW_SECT;
+uint8_t DIO_PCDDR_shadow SHADOW_SECT;
+uint8_t DIO_PEDDR_shadow SHADOW_SECT;
+uint8_t DIO_PFDDR_shadow SHADOW_SECT;
+uint8_t DIO_PJDDR_shadow SHADOW_SECT;
/* procesor H8S/2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
/* H8HELI CAN DRIVER *
* Ota Herm, 2005 */
#include <stdio.h>
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
/* H8HELI CAN DRIVER *
* Ota Herm, 2005 */
#include <stdio.h>
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
/* procesor H8S/2638 ver 1.1 */
#include <stdio.h>
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
* Ota Herm, 2005 */
#include <stdio.h>
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#define WITH_SFI_SEL
/* Buffer stransferred to second board power control register */
/* SRAM 32 kB (CS3) */
-//#define SRAM_START (volatile __u8 * const)(0x610000)
+//#define SRAM_START (volatile uint8_t * const)(0x610000)
#if 0
#define ISR_USB_INTV EXCPTVEC_IRQ2 /* pin IRQ2 on PF.0 */
-#define PDIUSB_READ_DATA_ADDR (volatile __u8 * const)(0x500000)
-#define PDIUSB_WRITE_DATA_ADDR (volatile __u8 * const)(0x500000)
-#define PDIUSB_COMMAND_ADDR (volatile __u8 * const)(0x500001)
+#define PDIUSB_READ_DATA_ADDR (volatile uint8_t * const)(0x500000)
+#define PDIUSB_WRITE_DATA_ADDR (volatile uint8_t * const)(0x500000)
+#define PDIUSB_COMMAND_ADDR (volatile uint8_t * const)(0x500001)
/* P1.0 .. DACK_N/DMACK0, P7.0 .. DMREQ/DREQ0, P7.2 .. EOT_N/TEND0 */
#undef PDIUSB_WITH_ADD_IRQ_HANDLER
#if 0
/* IDE (CS4) (CS5) powered by PF2 */
-#define SIDE_START1 (volatile __u8 * const)(0x800000)
-#define SIDE_START2 (volatile __u8 * const)(0xA00000)
-#define IDE0_DATA (volatile __u16 * const)(SIDE_START1+0) /* DATA */
+#define SIDE_START1 (volatile uint8_t * const)(0x800000)
+#define SIDE_START2 (volatile uint8_t * const)(0xA00000)
+#define IDE0_DATA (volatile uint16_t * const)(SIDE_START1+0) /* DATA */
#define IDE0_ERROR (SIDE_START1+2) /* Error/Features RO/WO */
#define IDE0_NSECTOR (SIDE_START1+4) /* Sector Count R/W */
#define IDE0_SECTOR (SIDE_START1+6) /* SN, LBA 0-7 */
/* 0xffd000-0xffdfff .. 4 kB for Flash emulation */
/* 0xffe000-0xffffc0 .. 4 kB - 64 B free*/
/* 0xffffc0-0xffffff .. 64 B free*/
-#define IRAM_START (volatile __u8 * const)(0xffb000)
-#define IRAM_START1 (volatile __u8 * const)(0xffe000)
-#define FRAM_START (volatile __u8 * const)(0xffffc0)
+#define IRAM_START (volatile uint8_t * const)(0xffb000)
+#define IRAM_START1 (volatile uint8_t * const)(0xffe000)
+#define FRAM_START (volatile uint8_t * const)(0xffffc0)
/* SCI0 - IrDA */
/* SCI1 - IIC0 (P34, P35) */
#define SHADOW_REG_WR(_reg,_val) \
(*(_reg)=_reg##_shadow=(_val))
-__u8 DIO_P1DDR_shadow;
-__u8 DIO_P3DDR_shadow;
-__u8 DIO_PEDDR_shadow;
-__u8 DIO_PFDDR_shadow;
-__u8 DIO_PJDDR_shadow;
+uint8_t DIO_P1DDR_shadow;
+uint8_t DIO_P3DDR_shadow;
+uint8_t DIO_PEDDR_shadow;
+uint8_t DIO_PFDDR_shadow;
+uint8_t DIO_PJDDR_shadow;
#define DEB_LED_INIT() \
do {\
/* procesor H8S/2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
#define SHADOW_SECT __attribute((section (".shadreg")))
-__u8 DIO_P1DDR_shadow SHADOW_SECT;
-__u8 DIO_P3DDR_shadow SHADOW_SECT;
-__u8 DIO_PFDDR_shadow SHADOW_SECT;
-__u8 DIO_PJDDR_shadow SHADOW_SECT;
+uint8_t DIO_P1DDR_shadow SHADOW_SECT;
+uint8_t DIO_P3DDR_shadow SHADOW_SECT;
+uint8_t DIO_PFDDR_shadow SHADOW_SECT;
+uint8_t DIO_PJDDR_shadow SHADOW_SECT;
/* procesor H8S/2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#define WITH_SFI_SEL
#define SCI_RS232_CHAN_DEFAULT 1
/* Keyboard KL41 (CS3) */
-#define KL41_LCD_INST (volatile __u8 * const)(0x700000)
-#define KL41_LCD_STAT (volatile __u8 * const)(0x700001)
-#define KL41_LCD_WDATA (volatile __u8 * const)(0x700002)
-#define KL41_LCD_RDATA (volatile __u8 * const)(0x700003)
-#define KL41_LED_WR (volatile __u8 * const)(0x700001)
-#define KL41_KBD_WR (volatile __u8 * const)(0x700003)
-#define KL41_KBD_RD (volatile __u8 * const)(0x700004)
+#define KL41_LCD_INST (volatile uint8_t * const)(0x700000)
+#define KL41_LCD_STAT (volatile uint8_t * const)(0x700001)
+#define KL41_LCD_WDATA (volatile uint8_t * const)(0x700002)
+#define KL41_LCD_RDATA (volatile uint8_t * const)(0x700003)
+#define KL41_LED_WR (volatile uint8_t * const)(0x700001)
+#define KL41_KBD_WR (volatile uint8_t * const)(0x700003)
+#define KL41_KBD_RD (volatile uint8_t * const)(0x700004)
#define KL41_SUPPORT_ENABLED
/* SGM Small graphics LCD module 240x64 (CS3) */
-#define SGM_LCD_DATA (volatile __u8 * const)(0x700000)
-#define SGM_LCD_CMD (volatile __u8 * const)(0x700001)
-#define SGM_LCD_STAT (volatile __u8 * const)(0x700001)
+#define SGM_LCD_DATA (volatile uint8_t * const)(0x700000)
+#define SGM_LCD_CMD (volatile uint8_t * const)(0x700001)
+#define SGM_LCD_STAT (volatile uint8_t * const)(0x700001)
/* Keyboard on MO_KBD1 */
-#define SGM_KBDI (volatile __u8 * const)(0x700002)
-#define SGM_KBDO (volatile __u8 * const)(0x700002)
+#define SGM_KBDI (volatile uint8_t * const)(0x700002)
+#define SGM_KBDO (volatile uint8_t * const)(0x700002)
//#define SGM_SUPPORT_ENABLED
/* XRAM 1 MB (CS2) */
-#define XRAM_START (volatile __u8 * const)(0x500000)
+#define XRAM_START (volatile uint8_t * const)(0x500000)
#define XRAM_SUPPORT_ENABLED
/* SRAM 32 kB (CSx) */
-//#define SRAM_START (volatile __u8 * const)(0x610000)
+//#define SRAM_START (volatile uint8_t * const)(0x610000)
/* AUXPORT (CS1) */
-#define AUXPORT_START (volatile __u8 * const)(0x200000)
+#define AUXPORT_START (volatile uint8_t * const)(0x200000)
#if 0
#define ISR_USB_INTV EXCPTVEC_IRQ2 /* pin IRQ2 on PF.0 */
#define PDIUSB_TEST_IRQ() (!(*DIO_PORTF & 1))
-#define PDIUSB_READ_DATA_ADDR (volatile __u8 * const)(0x500000)
-#define PDIUSB_WRITE_DATA_ADDR (volatile __u8 * const)(0x500000)
-#define PDIUSB_COMMAND_ADDR (volatile __u8 * const)(0x500001)
+#define PDIUSB_READ_DATA_ADDR (volatile uint8_t * const)(0x500000)
+#define PDIUSB_WRITE_DATA_ADDR (volatile uint8_t * const)(0x500000)
+#define PDIUSB_COMMAND_ADDR (volatile uint8_t * const)(0x500001)
/* P1.0 .. DACK_N/DMACK0, P7.0 .. DMREQ/DREQ0, P7.2 .. EOT_N/TEND0 */
#undef PDIUSB_WITH_ADD_IRQ_HANDLER
/* IDE (CS4) (CS5) powered by PF2 */
-#define SIDE_START1 (volatile __u8 * const)(0x800000)
-#define SIDE_START2 (volatile __u8 * const)(0xA00000)
-#define IDE0_DATA (volatile __u16 * const)(SIDE_START1+0) /* DATA */
+#define SIDE_START1 (volatile uint8_t * const)(0x800000)
+#define SIDE_START2 (volatile uint8_t * const)(0xA00000)
+#define IDE0_DATA (volatile uint16_t * const)(SIDE_START1+0) /* DATA */
#define IDE0_ERROR (SIDE_START1+2) /* Error/Features RO/WO */
#define IDE0_NSECTOR (SIDE_START1+4) /* Sector Count R/W */
#define IDE0_SECTOR (SIDE_START1+6) /* SN, LBA 0-7 */
/* 0xffd000-0xffdfff .. 4 kB for Flash emulation */
/* 0xffe000-0xffffc0 .. 4 kB - 64 B free*/
/* 0xffffc0-0xffffff .. 64 B free*/
-#define IRAM_START (volatile __u8 * const)(0xffb000)
-#define IRAM_START1 (volatile __u8 * const)(0xffe000)
-#define FRAM_START (volatile __u8 * const)(0xffffc0)
+#define IRAM_START (volatile uint8_t * const)(0xffb000)
+#define IRAM_START1 (volatile uint8_t * const)(0xffe000)
+#define FRAM_START (volatile uint8_t * const)(0xffffc0)
/* SCI0 - IrDA */
/* SCI1 - IIC0 (P34, P35) */
#define SHADOW_REG_WR(_reg,_val) \
(*(_reg)=_reg##_shadow=(_val))
-__u8 DIO_P1DDR_shadow;
-__u8 DIO_P3DDR_shadow;
-__u8 DIO_PFDDR_shadow;
-__u8 DIO_PJDDR_shadow;
+uint8_t DIO_P1DDR_shadow;
+uint8_t DIO_P3DDR_shadow;
+uint8_t DIO_PFDDR_shadow;
+uint8_t DIO_PJDDR_shadow;
#define DEB_LED_INIT() \
do {\
/* procesor H8S/2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
#define SHADOW_SECT __attribute((section (".shadreg")))
-__u8 DIO_P1DDR_shadow SHADOW_SECT;
-__u8 DIO_P3DDR_shadow SHADOW_SECT;
-__u8 DIO_PFDDR_shadow SHADOW_SECT;
-__u8 DIO_PJDDR_shadow SHADOW_SECT;
+uint8_t DIO_P1DDR_shadow SHADOW_SECT;
+uint8_t DIO_P3DDR_shadow SHADOW_SECT;
+uint8_t DIO_PFDDR_shadow SHADOW_SECT;
+uint8_t DIO_PJDDR_shadow SHADOW_SECT;
/* procesor H8S/2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2638h.h>
#include <system_def.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#define WITH_SFI_SEL
#if 1
#define ISR_USB_INTV EXCPTVEC_IRQ6 /* pin IRQ6 on PG.0 */
#define PDIUSB_TEST_IRQ() (!(*DIO_PORTG & 1))
-#define PDIUSB_READ_DATA_ADDR (volatile __u8 * const)(0x600000)
-#define PDIUSB_WRITE_DATA_ADDR (volatile __u8 * const)(0x600000)
-#define PDIUSB_COMMAND_ADDR (volatile __u8 * const)(0x600001)
+#define PDIUSB_READ_DATA_ADDR (volatile uint8_t * const)(0x600000)
+#define PDIUSB_WRITE_DATA_ADDR (volatile uint8_t * const)(0x600000)
+#define PDIUSB_COMMAND_ADDR (volatile uint8_t * const)(0x600001)
/* P1.0 .. DACK_N/DMACK0, P7.0 .. DMREQ/DREQ0, P7.2 .. EOT_N/TEND0 */
#undef PDIUSB_WITH_ADD_IRQ_HANDLER
/* 0xffd000-0xffdfff .. 4 kB for Flash emulation */
/* 0xffe000-0xffffc0 .. 4 kB - 64 B free*/
/* 0xffffc0-0xffffff .. 64 B free*/
-#define IRAM_START (volatile __u8 * const)(0xffb000)
-#define IRAM_START1 (volatile __u8 * const)(0xffe000)
-#define FRAM_START (volatile __u8 * const)(0xffffc0)
+#define IRAM_START (volatile uint8_t * const)(0xffb000)
+#define IRAM_START1 (volatile uint8_t * const)(0xffe000)
+#define FRAM_START (volatile uint8_t * const)(0xffffc0)
/* SCI0 - RS232/485 */
/* SCI1 - x */
#define SHADOW_REG_WR(_reg,_val) \
(*(_reg)=_reg##_shadow=(_val))
-__u8 DIO_P1DDR_shadow;
-__u8 DIO_P3DDR_shadow;
-__u8 DIO_P7DDR_shadow;
-__u8 DIO_PFDDR_shadow;
-__u8 DIO_PGDDR_shadow;
+uint8_t DIO_P1DDR_shadow;
+uint8_t DIO_P3DDR_shadow;
+uint8_t DIO_P7DDR_shadow;
+uint8_t DIO_PFDDR_shadow;
+uint8_t DIO_PGDDR_shadow;
#define DEB_LED_INIT() \
do { /* set P3.2, P3.6, P3.7 LED output */ \
/* procesor H8S/2633 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2633h.h>
#include <system_def.h>
#define SHADOW_SECT __attribute((section (".shadreg")))
-__u8 DIO_P1DDR_shadow SHADOW_SECT;
-__u8 DIO_P3DDR_shadow SHADOW_SECT;
-__u8 DIO_PFDDR_shadow SHADOW_SECT;
-__u8 DIO_PJDDR_shadow SHADOW_SECT;
+uint8_t DIO_P1DDR_shadow SHADOW_SECT;
+uint8_t DIO_P3DDR_shadow SHADOW_SECT;
+uint8_t DIO_PFDDR_shadow SHADOW_SECT;
+uint8_t DIO_PJDDR_shadow SHADOW_SECT;
/* procesor H8S/2638 ver 1.1 */
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#include <h8s2633h.h>
#include <system_def.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#define VER_CODE(major,minor,patch) (major*0x10000+minor*0x100+patch)
/* Software version */
#ifndef _BSPBASE_H
#define _BSPBASE_H
-#include <types.h>
+#include <stdint.h>
#include <system_def.h>
#include <cpu_def.h>
#include <lt_timer_types.h>
#ifndef _BSPBASE_H
#define _BSPBASE_H
-#include <types.h>
+#include <stdint.h>
#include <system_def.h>
#include <cpu_def.h>
#include <lt_timer_types.h>
#ifndef _BSPBASE_H
#define _BSPBASE_H
-#include <types.h>
+#include <stdint.h>
#include <system_def.h>
#include <cpu_def.h>
#include <lt_timer_types.h>
#ifndef _SYSTEM_DEF_H_
#define _SYSTEM_DEF_H_
-#include <types.h>
+#include <stdint.h>
#define WITH_SFI_SEL
/* 0xffe000-0xffffc0 .. 4 kB - 64 B free*/
/* 0xffffc0-0xffffff .. 64 B free*/
/*
-#define IRAM_START (volatile __u8 * const)(0xffb000)
-#define IRAM_START1 (volatile __u8 * const)(0xffe000)
-#define FRAM_START (volatile __u8 * const)(0xffffc0)
+#define IRAM_START (volatile uint8_t * const)(0xffb000)
+#define IRAM_START1 (volatile uint8_t * const)(0xffe000)
+#define FRAM_START (volatile uint8_t * const)(0xffffc0)
*/
#define KVPB_MINIMALIZED
#ifndef _I2C_DRV_H_
#define _I2C_DRV_H_
-#include <types.h>
+#include <stdint.h>
#include <cpu_def.h>
#if defined(CONFIG_OC_I2C_DRV_SYSLESS)
#define _KEYVALPB_H_
//#include <inttypes.h>
-#include <types.h>
+#include <stdint.h>
#include <system_def.h>
#include <cpu_def.h>
#define _USB_SPECIFICATIONS_AND_DEFINITIONS_MODULE
/*#include <inttypes.h>*/
-#include <types.h>
+#include <stdint.h>
#ifndef PACKED
#ifdef __GNUC__