source: rtems/c/src/lib/libcpu/powerpc/mpc83xx/i2c/mpc83xx_i2cdrv.h @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[267c7c5]1/*===============================================================*\
2| Project: RTEMS support for MPC83xx                              |
3+-----------------------------------------------------------------+
4|                    Copyright (c) 2007                           |
5|                    Embedded Brains GmbH                         |
6|                    Obere Lagerstr. 30                           |
7|                    D-82178 Puchheim                             |
8|                    Germany                                      |
9|                    rtems@embedded-brains.de                     |
10+-----------------------------------------------------------------+
11| The license and distribution terms for this file may be         |
12| found in the file LICENSE in this distribution or at            |
13|                                                                 |
[c499856]14| http://www.rtems.org/license/LICENSE.                           |
[267c7c5]15|                                                                 |
16+-----------------------------------------------------------------+
17| this file contains the MPC83xx I2C driver declarations          |
18\*===============================================================*/
19#ifndef _MPC83XX_I2CDRV_H
20#define _MPC83XX_I2CDRV_H
21
22#include <rtems/libi2c.h>
23#include <rtems/irq.h>
24
[fe5d5048]25#include <bsp.h>
26
27#ifdef __GEN83xx_BSP_h
28  #include <mpc83xx/mpc83xx.h>
29#endif
30
[267c7c5]31#ifdef __cplusplus
32extern "C" {
33#endif
34
[fe5d5048]35#ifdef LIBBSP_POWERPC_MPC55XXEVB_BSP_H
36  typedef struct {
37    volatile uint8_t i2cadr;
38    volatile uint8_t i2cfdr;
39    volatile uint8_t i2ccr;
40    volatile uint8_t i2csr;
41    volatile uint8_t i2cdr;
42    volatile uint8_t i2cdfsrr;
43  } m83xxI2CRegisters_t;
44#endif
45
[267c7c5]46typedef struct mpc83xx_i2c_softc {
[42bf1b9]47  m83xxI2CRegisters_t *reg_ptr;     /* ptr to HW registers             */
48  int                  initialized; /* TRUE: module is initialized     */
49  rtems_irq_number     irq_number;  /* IRQ number used for this module */
50  uint32_t             base_frq;    /* input frq for baud rate divider */
51  rtems_id             irq_sema_id; /* SEMA used for IRQ signalling    */
[aeff597]52  void               (*probe)(struct mpc83xx_i2c_softc *self);
[267c7c5]53} mpc83xx_i2c_softc_t ;
54
55typedef struct {
[359e537]56  rtems_libi2c_bus_t       bus_desc;
[267c7c5]57  struct mpc83xx_i2c_softc softc;
58} mpc83xx_i2c_desc_t;
59
60
61extern rtems_libi2c_bus_ops_t mpc83xx_i2c_ops;
62
63#ifdef __cplusplus
64}
65#endif
66
67
68#endif /* _MPC83XX_I2CDRV_H */
Note: See TracBrowser for help on using the repository browser.