[PATCH 1/5] imfs: Fix IMFS_stat_file()
Use the adjusted and not the requested memfile bytes per block. Untangle dependencies. --- cpukit/libfs/src/imfs/imfs_initsupp.c | 5 - cpukit/libfs/src/imfs/imfs_stat_file.c | 4 +++- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cpukit/libfs/src/imfs/imfs_initsupp.c b/cpukit/libfs/src/imfs/imfs_initsupp.c index 5528e18..8301831 100644 --- a/cpukit/libfs/src/imfs/imfs_initsupp.c +++ b/cpukit/libfs/src/imfs/imfs_initsupp.c @@ -25,11 +25,6 @@ #include #include -/* - * IMFS_determine_bytes_per_block - */ -int imfs_memfile_bytes_per_block = 0; - static int IMFS_determine_bytes_per_block( int *dest_bytes_per_block, int requested_bytes_per_block, diff --git a/cpukit/libfs/src/imfs/imfs_stat_file.c b/cpukit/libfs/src/imfs/imfs_stat_file.c index 2302705..9377b25 100644 --- a/cpukit/libfs/src/imfs/imfs_stat_file.c +++ b/cpukit/libfs/src/imfs/imfs_stat_file.c @@ -19,6 +19,8 @@ #include "imfs.h" +int imfs_memfile_bytes_per_block; + int IMFS_stat_file( const rtems_filesystem_location_info_t *loc, struct stat *buf @@ -27,7 +29,7 @@ int IMFS_stat_file( const IMFS_file_t *file = loc->node_access; buf->st_size = file->File.size; - buf->st_blksize = imfs_rq_memfile_bytes_per_block; + buf->st_blksize = imfs_memfile_bytes_per_block; return IMFS_stat( loc, buf ); } -- 1.8.4.5 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 5/5] termios: Add IO control handler
Update #2785. --- cpukit/libcsupport/include/rtems/termiostypes.h | 15 +++ cpukit/libcsupport/src/termios.c| 7 +-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/cpukit/libcsupport/include/rtems/termiostypes.h b/cpukit/libcsupport/include/rtems/termiostypes.h index 80251a2..a852c1d 100644 --- a/cpukit/libcsupport/include/rtems/termiostypes.h +++ b/cpukit/libcsupport/include/rtems/termiostypes.h @@ -184,6 +184,21 @@ typedef struct { ); /** + * @brief IO control handler. + * + * Invoked in case the Termios layer cannot deal with the IO request. + * + * @param[in] context The Termios device context. + * @param[in] request The IO control request. + * @param[in] buffer The IO control buffer. + */ + int (*ioctl)( +rtems_termios_device_context *context, +ioctl_command_t request, +void *buffer + ); + + /** * @brief Termios device mode. */ rtems_termios_device_mode mode; diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c index 3a6a389..b972b4f 100644 --- a/cpukit/libcsupport/src/termios.c +++ b/cpukit/libcsupport/src/termios.c @@ -781,8 +781,11 @@ rtems_termios_ioctl (void *arg) default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); -} -else { +} else if (tty->handler.ioctl) { + args->ioctl_return = (*tty->handler.ioctl) (tty->device_context, +args->command, args->buffer); + sc = RTEMS_SUCCESSFUL; +} else { sc = RTEMS_INVALID_NUMBER; } break; -- 1.8.4.5 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 2/5] imfs: Untangle dependencies
This helps to use IMFS_make_generic_node() without pulling in the complete IMFS implementation. --- cpukit/libfs/src/imfs/imfs_initsupp.c | 89 -- cpukit/libfs/src/imfs/imfs_stat.c | 91 +++ 2 files changed, 91 insertions(+), 89 deletions(-) diff --git a/cpukit/libfs/src/imfs/imfs_initsupp.c b/cpukit/libfs/src/imfs/imfs_initsupp.c index 8301831..27b93cb 100644 --- a/cpukit/libfs/src/imfs/imfs_initsupp.c +++ b/cpukit/libfs/src/imfs/imfs_initsupp.c @@ -51,52 +51,6 @@ static int IMFS_determine_bytes_per_block( return 0; } -IMFS_jnode_t *IMFS_initialize_node( - IMFS_jnode_t *node, - const IMFS_node_control *node_control, - const char *name, - size_t namelen, - mode_t mode, - void *arg -) -{ - struct timeval tv; - - if ( namelen > IMFS_NAME_MAX ) { -errno = ENAMETOOLONG; - -return NULL; - } - - gettimeofday( &tv, 0 ); - - /* - * Fill in the basic information - */ - node->name = name; - node->namelen = namelen; - node->reference_count = 1; - node->st_nlink = 1; - node->control = node_control; - - /* - * Fill in the mode and permission information for the jnode structure. - */ - node->st_mode = mode; - node->st_uid = geteuid(); - node->st_gid = getegid(); - - /* - * Now set all the times. - */ - - node->stat_atime = (time_t) tv.tv_sec; - node->stat_mtime = (time_t) tv.tv_sec; - node->stat_ctime = (time_t) tv.tv_sec; - - return (*node_control->node_initialize)( node, arg ); -} - int IMFS_initialize_support( rtems_filesystem_mount_table_entry_t *mt_entry, const void *data @@ -133,33 +87,6 @@ int IMFS_initialize_support( return 0; } -int IMFS_node_clone( rtems_filesystem_location_info_t *loc ) -{ - IMFS_jnode_t *node = loc->node_access; - - ++node->reference_count; - - return 0; -} - -void IMFS_node_destroy( IMFS_jnode_t *node ) -{ - IMFS_assert( node->reference_count == 0 ); - - (*node->control->node_destroy)( node ); -} - -void IMFS_node_free( const rtems_filesystem_location_info_t *loc ) -{ - IMFS_jnode_t *node = loc->node_access; - - --node->reference_count; - - if ( node->reference_count == 0 ) { -IMFS_node_destroy( node ); - } -} - static IMFS_jnode_t *IMFS_node_initialize_enosys( IMFS_jnode_t *node, void *arg @@ -178,22 +105,6 @@ IMFS_jnode_t *IMFS_node_initialize_default( return node; } -IMFS_jnode_t *IMFS_node_remove_default( - IMFS_jnode_t *node -) -{ - return node; -} - -void IMFS_node_destroy_default( IMFS_jnode_t *node ) -{ - if ( ( node->flags & IMFS_NODE_FLAG_NAME_ALLOCATED ) != 0 ) { -free( RTEMS_DECONST( char *, node->name ) ); - } - - free( node ); -} - const IMFS_mknod_control IMFS_mknod_control_enosys = { { .handlers = &rtems_filesystem_handlers_default, diff --git a/cpukit/libfs/src/imfs/imfs_stat.c b/cpukit/libfs/src/imfs/imfs_stat.c index c0298b1..cfbcbf1 100644 --- a/cpukit/libfs/src/imfs/imfs_stat.c +++ b/cpukit/libfs/src/imfs/imfs_stat.c @@ -23,6 +23,97 @@ #include "imfs.h" +#include + +IMFS_jnode_t *IMFS_initialize_node( + IMFS_jnode_t *node, + const IMFS_node_control *node_control, + const char *name, + size_t namelen, + mode_t mode, + void *arg +) +{ + struct timeval tv; + + if ( namelen > IMFS_NAME_MAX ) { +errno = ENAMETOOLONG; + +return NULL; + } + + gettimeofday( &tv, 0 ); + + /* + * Fill in the basic information + */ + node->name = name; + node->namelen = namelen; + node->reference_count = 1; + node->st_nlink = 1; + node->control = node_control; + + /* + * Fill in the mode and permission information for the jnode structure. + */ + node->st_mode = mode; + node->st_uid = geteuid(); + node->st_gid = getegid(); + + /* + * Now set all the times. + */ + + node->stat_atime = (time_t) tv.tv_sec; + node->stat_mtime = (time_t) tv.tv_sec; + node->stat_ctime = (time_t) tv.tv_sec; + + return (*node_control->node_initialize)( node, arg ); +} + +int IMFS_node_clone( rtems_filesystem_location_info_t *loc ) +{ + IMFS_jnode_t *node = loc->node_access; + + ++node->reference_count; + + return 0; +} + +void IMFS_node_destroy( IMFS_jnode_t *node ) +{ + IMFS_assert( node->reference_count == 0 ); + + (*node->control->node_destroy)( node ); +} + +void IMFS_node_free( const rtems_filesystem_location_info_t *loc ) +{ + IMFS_jnode_t *node = loc->node_access; + + --node->reference_count; + + if ( node->reference_count == 0 ) { +IMFS_node_destroy( node ); + } +} + +IMFS_jnode_t *IMFS_node_remove_default( + IMFS_jnode_t *node +) +{ + return node; +} + +void IMFS_node_destroy_default( IMFS_jnode_t *node ) +{ + if ( ( node->flags & IMFS_NODE_FLAG_NAME_ALLOCATED ) != 0 ) { +free( RTEMS_DECONST( char *, node->name ) ); + } + + free( node ); +} + int IMFS_stat( const rtems_filesystem_location_info_t *loc, struct stat *buf -- 1.8.4.5 ___ devel mailing list devel@rtems.org http://li
[PATCH 3/5] tests: CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM
Avoid unnecessary use of CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM. --- testsuites/libtests/complex/init.c| 1 - testsuites/libtests/math/init.c | 1 - testsuites/libtests/mathf/init.c | 1 - testsuites/libtests/mathl/init.c | 1 - testsuites/libtests/stringto01/init.c | 1 - testsuites/libtests/termios02/init.c | 1 - testsuites/samples/hello/init.c | 1 - 7 files changed, 7 deletions(-) diff --git a/testsuites/libtests/complex/init.c b/testsuites/libtests/complex/init.c index 3d542fb..c4295e6 100644 --- a/testsuites/libtests/complex/init.c +++ b/testsuites/libtests/complex/init.c @@ -43,7 +43,6 @@ extern void docomplexl(void); #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_MAXIMUM_TASKS1 -#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM #define CONFIGURE_INIT_TASK_ATTRIBUTESRTEMS_FLOATING_POINT #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION diff --git a/testsuites/libtests/math/init.c b/testsuites/libtests/math/init.c index c045735..7329793 100644 --- a/testsuites/libtests/math/init.c +++ b/testsuites/libtests/math/init.c @@ -46,7 +46,6 @@ extern void domath(void); #define CONFIGURE_MAXIMUM_TASKS 1 #define CONFIGURE_INIT_TASK_ATTRIBUTESRTEMS_FLOATING_POINT -#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION diff --git a/testsuites/libtests/mathf/init.c b/testsuites/libtests/mathf/init.c index c91e6fe..1f75f2b 100644 --- a/testsuites/libtests/mathf/init.c +++ b/testsuites/libtests/mathf/init.c @@ -42,7 +42,6 @@ extern void domathf(void); #define CONFIGURE_MAXIMUM_TASKS 1 #define CONFIGURE_INIT_TASK_ATTRIBUTESRTEMS_FLOATING_POINT -#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION diff --git a/testsuites/libtests/mathl/init.c b/testsuites/libtests/mathl/init.c index ca26f11..4ae7511 100644 --- a/testsuites/libtests/mathl/init.c +++ b/testsuites/libtests/mathl/init.c @@ -42,7 +42,6 @@ extern void domathl(void); #define CONFIGURE_MAXIMUM_TASKS 1 #define CONFIGURE_INIT_TASK_ATTRIBUTESRTEMS_FLOATING_POINT -#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION diff --git a/testsuites/libtests/stringto01/init.c b/testsuites/libtests/stringto01/init.c index 52ac62b..d36a4e5 100644 --- a/testsuites/libtests/stringto01/init.c +++ b/testsuites/libtests/stringto01/init.c @@ -166,7 +166,6 @@ rtems_task Init( #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_MAXIMUM_TASKS1 -#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM #define CONFIGURE_INIT_TASK_ATTRIBUTES RTEMS_FLOATING_POINT #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION diff --git a/testsuites/libtests/termios02/init.c b/testsuites/libtests/termios02/init.c index 181f317..fe16150 100644 --- a/testsuites/libtests/termios02/init.c +++ b/testsuites/libtests/termios02/init.c @@ -148,7 +148,6 @@ rtems_task Init( #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_MAXIMUM_TASKS1 -#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM #define CONFIGURE_INITIAL_EXTENSIONS RTEMS_TEST_INITIAL_EXTENSION diff --git a/testsuites/samples/hello/init.c b/testsuites/samples/hello/init.c index acdabd8..a2d6c30 100644 --- a/testsuites/samples/hello/init.c +++ b/testsuites/samples/hello/init.c @@ -42,7 +42,6 @@ rtems_task Init( #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER #define CONFIGURE_MAXIMUM_TASKS1 -#define CONFIGURE_USE_DEVFS_AS_BASE_FILESYSTEM #define CONFIGURE_RTEMS_INIT_TASKS_TABLE -- 1.8.4.5 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 4/5] termios: Use IMFS nodes for new Termios devices
This makes the new Termios devices independent of device major/minor numbers. It enables BSP independent Termios device drivers which may reside in the cpukit domain. These drivers require an IMFS and do not work with the device file system. However, the device file system should go away in the future. --- c/src/lib/libbsp/arm/atsam/console/console.c | 14 +- c/src/lib/libbsp/arm/tms570/console/tms570-sci.c | 2 - c/src/lib/libbsp/powerpc/t32mppc/console/console.c | 2 - c/src/lib/libbsp/shared/console-termios-init.c | 41 +- c/src/lib/libbsp/shared/console-termios.c | 20 +- c/src/lib/libbsp/shared/include/console-termios.h | 19 - c/src/lib/libbsp/sparc/leon3/console/console.c | 6 - cpukit/libcsupport/include/rtems/termiostypes.h| 56 +-- cpukit/libcsupport/src/termios.c | 460 + testsuites/libtests/termios01/init.c | 162 +++- 10 files changed, 348 insertions(+), 434 deletions(-) diff --git a/c/src/lib/libbsp/arm/atsam/console/console.c b/c/src/lib/libbsp/arm/atsam/console/console.c index ef75e8c..ebf284b 100644 --- a/c/src/lib/libbsp/arm/atsam/console/console.c +++ b/c/src/lib/libbsp/arm/atsam/console/console.c @@ -21,6 +21,8 @@ #include +#include + typedef struct { rtems_termios_device_context base; Usart *regs; @@ -488,8 +490,6 @@ rtems_status_code console_initialize( usart[sizeof(usart) - 2] = (char) ('0' + i); rtems_termios_device_install( &usart[0], - major, - minor, &atsam_usart_handler, NULL, &atsam_usart_instances[i].base @@ -498,11 +498,9 @@ rtems_status_code console_initialize( #if ATSAM_CONSOLE_DEVICE_TYPE == 0 if (i == ATSAM_CONSOLE_DEVICE_INDEX) { atsam_usart_instances[i].console = true; - rtems_io_register_name(CONSOLE_DEVICE_NAME, major, minor); + link(&usart[0], CONSOLE_DEVICE_NAME); } #endif - -++minor; } for (i = 0; i < RTEMS_ARRAY_SIZE(atsam_uart_instances); ++i) { @@ -511,8 +509,6 @@ rtems_status_code console_initialize( uart[sizeof(uart) - 2] = (char) ('0' + i); rtems_termios_device_install( &uart[0], - major, - minor, &atsam_uart_handler, NULL, &atsam_uart_instances[i].base @@ -521,11 +517,9 @@ rtems_status_code console_initialize( #if ATSAM_CONSOLE_DEVICE_TYPE == 1 if (i == ATSAM_CONSOLE_DEVICE_INDEX) { atsam_uart_instances[i].console = true; - rtems_io_register_name(CONSOLE_DEVICE_NAME, major, minor); + link(&usart[0], CONSOLE_DEVICE_NAME); } #endif - -++minor; } return RTEMS_SUCCESSFUL; diff --git a/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c b/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c index 6651cd8..1cd3fe1 100644 --- a/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c +++ b/c/src/lib/libbsp/arm/tms570/console/tms570-sci.c @@ -138,8 +138,6 @@ rtems_device_driver console_initialize( */ sc = rtems_termios_device_install( ctx->device_name, -major, -minor, handler, NULL, &ctx->base diff --git a/c/src/lib/libbsp/powerpc/t32mppc/console/console.c b/c/src/lib/libbsp/powerpc/t32mppc/console/console.c index 0c39bdd..bc94f85 100644 --- a/c/src/lib/libbsp/powerpc/t32mppc/console/console.c +++ b/c/src/lib/libbsp/powerpc/t32mppc/console/console.c @@ -115,8 +115,6 @@ rtems_device_driver console_initialize( rtems_termios_device_context_initialize(&ctx->base, "T32 Console"); rtems_termios_device_install( CONSOLE_DEVICE_NAME, -major, -0, &t32_console_handler, NULL, &ctx->base diff --git a/c/src/lib/libbsp/shared/console-termios-init.c b/c/src/lib/libbsp/shared/console-termios-init.c index 83d14d1..a01a75a 100644 --- a/c/src/lib/libbsp/shared/console-termios-init.c +++ b/c/src/lib/libbsp/shared/console-termios-init.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 embedded brains GmbH. All rights reserved. + * Copyright (c) 2014, 2016 embedded brains GmbH. All rights reserved. * * embedded brains GmbH * Dornierstr. 4 @@ -17,36 +17,7 @@ #include -RTEMS_INTERRUPT_LOCK_DEFINE( static, console_lock, "console" ) - -static rtems_device_major_number console_major = UINT32_MAX; - -static rtems_device_minor_number console_minor; - -rtems_status_code console_device_install( - const char *device_file, - const rtems_termios_device_handler *handler, - const rtems_termios_device_flow*flow, - rtems_termios_device_context *context -) -{ - rtems_interrupt_lock_context lock_context; - rtems_device_minor_numberminor; - - rtems_interrupt_lock_acquire( &console_lock, &lock_context ); - minor = console_minor; - ++console_minor; - rtems_interrupt_lock_release( &console_lock, &lock_context ); - - return rtems_termios_device_install( -device_file, -console_major, -minor, -handler, -flow, -context - ); -} +#include bool console_devic
[PATCH] cpukit: Add nxp-sc16is752 serial device driver
--- cpukit/dev/Makefile.am| 7 + cpukit/dev/include/dev/serial/nxp-sc16is752.h | 68 ++ cpukit/dev/preinstall.am | 9 + cpukit/dev/serial/nxp-sc16is752-regs.h| 122 ++ cpukit/dev/serial/nxp-sc16is752-spi.c | 90 +++ cpukit/dev/serial/nxp-sc16is752.c | 324 ++ 6 files changed, 620 insertions(+) create mode 100644 cpukit/dev/include/dev/serial/nxp-sc16is752.h create mode 100644 cpukit/dev/serial/nxp-sc16is752-regs.h create mode 100644 cpukit/dev/serial/nxp-sc16is752-spi.c create mode 100644 cpukit/dev/serial/nxp-sc16is752.c diff --git a/cpukit/dev/Makefile.am b/cpukit/dev/Makefile.am index 2b65390..cdc3fe8 100644 --- a/cpukit/dev/Makefile.am +++ b/cpukit/dev/Makefile.am @@ -15,6 +15,10 @@ include_dev_spidir = $(includedir)/dev/spi include_dev_spi_HEADERS = include_dev_spi_HEADERS += include/dev/spi/spi.h +include_dev_serialdir = $(includedir)/dev/serial +include_dev_serial_HEADERS = +include_dev_serial_HEADERS += include/dev/serial/nxp-sc16is752.h + include_linuxdir = $(includedir)/linux include_linux_HEADERS = include_linux_HEADERS += include/linux/i2c.h @@ -33,6 +37,9 @@ libdev_a_SOURCES += i2c/i2c-bus.c libdev_a_SOURCES += i2c/i2c-dev.c libdev_a_SOURCES += i2c/switch-nxp-pca9548a.c libdev_a_SOURCES += spi/spi-bus.c +libdev_a_SOURCES += serial/nxp-sc16is752.c +libdev_a_SOURCES += serial/nxp-sc16is752-spi.c +libdev_a_SOURCES += serial/nxp-sc16is752-regs.h include $(srcdir)/preinstall.am include $(top_srcdir)/automake/local.am diff --git a/cpukit/dev/include/dev/serial/nxp-sc16is752.h b/cpukit/dev/include/dev/serial/nxp-sc16is752.h new file mode 100644 index 000..2566ebe --- /dev/null +++ b/cpukit/dev/include/dev/serial/nxp-sc16is752.h @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2016 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef _DEV_SERIAL_SC16IS752_H +#define _DEV_SERIAL_SC16IS752_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* General device paths */ +#define SC16IS752_PATH "/dev/ttyUARTSC16IS752" + +typedef struct { + const char *spi_nxp_path; + uint8_t cs; + uint32_t speed_hz; +} sc16is752_reg_ctx; + +typedef struct { + rtems_termios_device_context base; + sc16is752_reg_ctx *reg_ctx; + int (*write_reg)(int fd, +sc16is752_reg_ctx *reg_ctx, +uint8_t addr, +uint8_t data + ); + int (*read_reg)(int fd, +sc16is752_reg_ctx *reg_ctx, +uint8_t addr, +uint8_t *data + ); + uint32_t input_frequency; + rtems_vector_number irq; + int fd; + bool rs485_wanted; +#ifdef SC16IS752_USE_INTERRUPTS + bool transmitting; +#endif +} sc16is752_uart_ctx; + +rtems_status_code sc16is752_initialize( + sc16is752_uart_ctx *uart_ctx, + sc16is752_reg_ctx *reg_ctx, + uint32_t input_frequency, + rtems_vector_number irq, + bool rs485_wanted, + void *arg +); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _DEV_SERIAL_SC16IS752_H */ diff --git a/cpukit/dev/preinstall.am b/cpukit/dev/preinstall.am index d2e63ba..801bdb5 100644 --- a/cpukit/dev/preinstall.am +++ b/cpukit/dev/preinstall.am @@ -48,6 +48,15 @@ $(PROJECT_INCLUDE)/dev/spi/spi.h: include/dev/spi/spi.h $(PROJECT_INCLUDE)/dev/s $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/dev/spi/spi.h PREINSTALL_FILES += $(PROJECT_INCLUDE)/dev/spi/spi.h +$(PROJECT_INCLUDE)/dev/serial/$(dirstamp): + @$(MKDIR_P) $(PROJECT_INCLUDE)/dev/serial + @: > $(PROJECT_INCLUDE)/dev/serial/$(dirstamp) +PREINSTALL_DIRS += $(PROJECT_INCLUDE)/dev/serial/$(dirstamp) + +$(PROJECT_INCLUDE)/dev/serial/nxp-sc16is752.h: include/dev/serial/nxp-sc16is752.h $(PROJECT_INCLUDE)/dev/serial/$(dirstamp) + $(INSTALL_DATA) $< $(PROJECT_INCLUDE)/dev/serial/nxp-sc16is752.h +PREINSTALL_FILES += $(PROJECT_INCLUDE)/dev/serial/nxp-sc16is752.h + $(PROJECT_INCLUDE)/linux/$(dirstamp): @$(MKDIR_P) $(PROJECT_INCLUDE)/linux @: > $(PROJECT_INCLUDE)/linux/$(dirstamp) diff --git a/cpukit/dev/serial/nxp-sc16is752-regs.h b/cpukit/dev/serial/nxp-sc16is752-regs.h new file mode 100644 index 000..0b1c024 --- /dev/null +++ b/cpukit/dev/serial/nxp-sc16is752-regs.h @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2016 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef LIBBSP_ARM_ATSAM_SC16IS752_H +#define LIBBSP_ARM_ATSAM_SC16IS752_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* General device paths */ +#define SC16IS752_PATH "/dev/ttyUARTSC