source: rtems/bsps/include/libchip/disp_hcms29xx.h @ 2afb22b

5
Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • Property mode set to 100644
File size: 7.4 KB
Line 
1/*===============================================================*\
2| Project: display driver for HCMS29xx                            |
3+-----------------------------------------------------------------+
4| File: disp_hcms29xx.h                                           |
5+-----------------------------------------------------------------+
6|                    Copyright (c) 2008                           |
7|                    Embedded Brains GmbH                         |
8|                    Obere Lagerstr. 30                           |
9|                    D-82178 Puchheim                             |
10|                    Germany                                      |
11|                    rtems@embedded-brains.de                     |
12+-----------------------------------------------------------------+
13| The license and distribution terms for this file may be         |
14| found in the file LICENSE in this distribution or at            |
15| http://www.rtems.org/license/LICENSE.                           |
16+-----------------------------------------------------------------+
17| this file declares the SPI based driver for a HCMS29xx 4 digit  |
18| alphanumeric LED display                                        |
19\*===============================================================*/
20
21#ifndef _DISP_HCMS29XX_H
22#define _DISP_HCMS29XX_H
23#include <rtems.h>
24#include <time.h>
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29#define DISP_HCMS29XX_TEXT_CNT (128)
30
31  typedef struct {
32    rtems_device_minor_number minor;   /* minor device number            */
33    /*
34     * in the disp_buffer, the string to be displayed is placed
35     */
36    char disp_buffer[DISP_HCMS29XX_TEXT_CNT];
37    int  disp_buf_cnt; /* number of valid chars in disp_buffer */
38    /*
39     * in the trns buffer the string is transfered to display task
40     */
41    char trns_buffer[DISP_HCMS29XX_TEXT_CNT];
42    /*
43     * in the dev_buffer, characters will be accumulated before display...
44     */
45    char dev_buffer[DISP_HCMS29XX_TEXT_CNT];
46    int  dev_buf_cnt; /* number of valid chars in dev_buffer */
47
48    rtems_id trns_sema_id;  /* ID of disp trns buffer sema   */
49    rtems_id task_id;       /* ID of disp task               */
50    bool rotate;            /* FLAG: display is upside down       */
51  } spi_disp_hcms29xx_param_t;
52
53  typedef struct {
54    rtems_libi2c_drv_t        libi2c_drv_entry;
55    spi_disp_hcms29xx_param_t disp_param;
56  } disp_hcms29xx_drv_t;
57  /*
58   * pass this descriptor pointer to rtems_libi2c_register_drv
59   */
60  extern rtems_libi2c_drv_t *disp_hcms29xx_driver_descriptor;
61
62/*=========================================================================*\
63| Function:                                                                 |
64\*-------------------------------------------------------------------------*/
65rtems_device_driver disp_hcms29xx_dev_initialize
66  (
67/*-------------------------------------------------------------------------*\
68| Purpose:                                                                  |
69|   prepare the display device driver to accept write calls                 |
70|   register device with its name                                           |
71+---------------------------------------------------------------------------+
72| Input Parameters:                                                         |
73\*-------------------------------------------------------------------------*/
74  rtems_device_major_number  major,
75  rtems_device_minor_number  minor,
76  void                      *arg
77   );
78/*-------------------------------------------------------------------------*\
79| Return Value:                                                             |
80|    rtems_status_code                                                      |
81\*=========================================================================*/
82
83/*=========================================================================*\
84| Function:                                                                 |
85\*-------------------------------------------------------------------------*/
86rtems_device_driver disp_hcms29xx_dev_open
87(
88/*-------------------------------------------------------------------------*\
89| Purpose:                                                                  |
90|   open the display device                                                 |
91+---------------------------------------------------------------------------+
92| Input Parameters:                                                         |
93\*-------------------------------------------------------------------------*/
94  rtems_device_major_number  major,
95  rtems_device_minor_number  minor,
96  void                      *arg
97 );
98/*-------------------------------------------------------------------------*\
99| Return Value:                                                             |
100|    rtems_status_code                                                      |
101\*=========================================================================*/
102
103/*=========================================================================*\
104| Function:                                                                 |
105\*-------------------------------------------------------------------------*/
106rtems_device_driver disp_hcms29xx_dev_write
107(
108/*-------------------------------------------------------------------------*\
109| Purpose:                                                                  |
110|   write to display device                                                 |
111+---------------------------------------------------------------------------+
112| Input Parameters:                                                         |
113\*-------------------------------------------------------------------------*/
114  rtems_device_major_number  major,
115  rtems_device_minor_number  minor,
116  void                      *arg
117 );
118/*-------------------------------------------------------------------------*\
119| Return Value:                                                             |
120|    rtems_status_code                                                      |
121\*=========================================================================*/
122
123/*=========================================================================*\
124| Function:                                                                 |
125\*-------------------------------------------------------------------------*/
126rtems_device_driver disp_hcms29xx_dev_close
127(
128/*-------------------------------------------------------------------------*\
129| Purpose:                                                                  |
130|   close the display device                                                |
131+---------------------------------------------------------------------------+
132| Input Parameters:                                                         |
133\*-------------------------------------------------------------------------*/
134  rtems_device_major_number  major,
135  rtems_device_minor_number  minor,
136  void                      *arg
137 );
138/*-------------------------------------------------------------------------*\
139| Return Value:                                                             |
140|    rtems_status_code                                                      |
141\*=========================================================================*/
142
143#define DISP_HCMS29XX_DRIVER {                  \
144    disp_hcms29xx_dev_initialize,               \
145      disp_hcms29xx_dev_open,                   \
146      NULL,                                     \
147      disp_hcms29xx_dev_write,                  \
148      NULL,                                     \
149      disp_hcms29xx_dev_close}
150 
151   
152#ifdef __cplusplus
153}
154#endif
155
156#endif /* _DISP_HCMS29XX_H */
Note: See TracBrowser for help on using the repository browser.