source: rtems/bsps/include/libchip/icm7170.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: 2.2 KB
Line 
1/*
2 *  This file contains the definitions for the following real-time clocks:
3 *
4 *    + Harris Semiconduction ICM7170
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.rtems.org/license/LICENSE.
12 */
13
14#ifndef __LIBCHIP_ICM7170_h
15#define __LIBCHIP_ICM7170_h
16
17/*
18 *  Register indices
19 */
20
21#define ICM7170_CONTROL             0x11
22
23
24#define ICM7170_COUNTER_HUNDREDTHS  0x00
25#define ICM7170_HOUR                0x01
26#define ICM7170_MINUTE              0x02
27#define ICM7170_SECOND              0x03
28#define ICM7170_MONTH               0x04
29#define ICM7170_DATE                0x05
30#define ICM7170_YEAR                0x06
31#define ICM7170_DAY_OF_WEEK         0x07
32
33/*
34 *  Configuration information in the parameters field
35 */
36
37#define ICM7170_AT_32_KHZ  0x00
38#define ICM7170_AT_1_MHZ   0x01
39#define ICM7170_AT_2_MHZ   0x02
40#define ICM7170_AT_4_MHZ   0x03
41
42/*
43 *  Driver function table
44 */
45
46extern rtc_fns icm7170_fns;
47
48/*
49 * Default register access routines
50 */
51
52uint32_t   icm7170_get_register(    /* registers are at 1 byte boundaries */
53  uintptr_t   ulCtrlPort,           /*   and accessed as bytes            */
54  uint8_t     ucRegNum
55);
56
57void  icm7170_set_register(
58  uintptr_t   ulCtrlPort,
59  uint8_t     ucRegNum,
60  uint32_t    ucData
61);
62
63uint32_t   icm7170_get_register_2(  /* registers are at 2 byte boundaries */
64  uintptr_t   ulCtrlPort,           /*   and accessed as bytes            */
65  uint8_t     ucRegNum
66);
67
68void  icm7170_set_register_2(
69  uintptr_t   ulCtrlPort,
70  uint8_t     ucRegNum,
71  uint32_t    ucData
72);
73
74uint32_t   icm7170_get_register_4(  /* registers are at 4 byte boundaries */
75  uintptr_t   ulCtrlPort,           /*   and accessed as bytes            */
76  uint8_t     ucRegNum
77);
78
79void  icm7170_set_register_4(
80  uintptr_t   ulCtrlPort,
81  uint8_t     ucRegNum,
82  uint32_t    ucData
83);
84
85uint32_t   icm7170_get_register_8(  /* registers are at 8 byte boundaries */
86  uintptr_t   ulCtrlPort,           /*   and accessed as bytes            */
87  uint8_t     ucRegNum
88);
89
90void  icm7170_set_register_8(
91  uintptr_t   ulCtrlPort,
92  uint8_t     ucRegNum,
93  uint32_t    ucData
94);
95
96#endif
97/* end of include file */
Note: See TracBrowser for help on using the repository browser.