mtkernel_3/device/include/dev_def.h | bare source | permlink (0.00 seconds) |
1: /* 2: *---------------------------------------------------------------------- 3: * Device Driver for micro T-Kernel for μT-Kernel 3.0 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/08. 10: * 11: *---------------------------------------------------------------------- 12: */ 13: 14: /* 15: * dev_def.c 16: * Device driver common definition 17: */ 18: 19: #ifndef __DEVINC_DEVDEF_H__ 20: #define __DEVINC_DEVDEF_H__ 21: 22: #include <config_device.h> 23: 24: #if USE_SDEV_DRV /* Use Sample device driver */ 25: 26: #if DEVCNF_USE_SER && DEV_SER_UNITNM /* Use Serial communication device */ 27: #define DEV_SER_ENABLE 1 28: #else 29: #define DEV_SER_ENABLE 0 30: #endif /* DEVCNF_USE_SER */ 31: 32: #if DEVCNF_USE_ADC && DEV_ADC_UNITNM /* Use A/D conversion device */ 33: #define DEV_ADC_ENABLE 1 34: #else 35: #define DEV_ADC_ENABLE 0 36: #endif /* DEVCNF_USE_ADC */ 37: 38: #if DEVCNF_USE_IIC && DEV_I2C_UNITNM /* Use I2C communication device */ 39: #define DEV_IIC_ENABLE 1 40: #else 41: #define DEV_IIC_ENABLE 0 42: #endif /* DEVCNF_USE_IIC */ 43: 44: #else /* Do not use sample device driver */ 45: 46: #define DEV_SER_ENABLE 0 // Serial communication device 47: #define DEV_ADC_ENABLE 0 // A/D conversion device 48: #define DEV_IIC_ENABLE 0 // I2C communication device 49: 50: #endif /* USE_SDEV_DRV */ 51: #endif /* __DEVINC_DEVICE_H__ */