mtkernel_3/device/include/dev_ser.h | bare source | permlink (0.01 seconds) |
1: /* 2: *---------------------------------------------------------------------- 3: * Device Driver for micro T-Kernel for μT-Kernel 3.00.05 4: * 5: * Copyright (C) 2020-2021 by Ken Sakamura. 6: * This software is distributed under the T-License 2.2. 7: *---------------------------------------------------------------------- 8: * 9: * Released by TRON Forum(http://www.tron.org) at 2021/11. 10: * 11: *---------------------------------------------------------------------- 12: */ 13: 14: /* 15: * dev_ser.h 16: * Serial communication device driver 17: */ 18: 19: #ifndef __DEVINC_SER_H__ 20: #define __DEVINC_SER_H__ 21: 22: /*----------------------------------------------------------------------*/ 23: /* Device driver initialization 24: */ 25: IMPORT ER dev_init_ser( UW unit ); 26: 27: /*----------------------------------------------------------------------*/ 28: /* Attribute data number 29: */ 30: typedef enum { 31: TDN_SER_MODE = -100, /* RW: Communication mode */ 32: TDN_SER_SPEED = -101, /* RW: Communication Speed */ 33: TDN_SER_SNDTMO = -102, /* RW: Send timeout */ 34: TDN_SER_RCVTMO = -103, /* RW: Receive timeout */ 35: TDN_SER_COMERR = -104, /* R-: Communication Error */ 36: TDN_SER_BREAK = -105, /* -W: Send Break */ 37: } T_DN_SER_ATR; 38: 39: /* Communication Error */ 40: #define DEV_SER_ERR_ROVR (1<<7) /* Recive buffe over flow */ 41: 42: /*----------------------------------------------------------------------*/ 43: /* Hardware dependent definition 44: */ 45: #ifdef CPU_TMPM367FDFG 46: #include "../ser/sysdepend/tx03_m367/ser_mode_m367.h" 47: #endif /* CPU_TMPM367FDFG */ 48: #ifdef CPU_RX231 49: #include "../ser/sysdepend/rx231/ser_mode_rx231.h" 50: #endif /* CPU_RX231 */ 51: #ifdef CPU_STM32L4 52: #include "../ser/sysdepend/stm32l4/ser_mode_stm32l4.h" 53: #endif /* CPU_STM32L4 */ 54: #ifdef CPU_RZA2M 55: #include "../ser/sysdepend/rza2m/ser_mode_rza2m.h" 56: #endif /* CPU_RZA2M */ 57: 58: #endif /* __DEVINC_SER_H__ */