source: rtems/bsps/powerpc/include/mpc83xx/mpc83xx_i2cdrv.h @ 5028a9f

Last change on this file since 5028a9f was f0f6e888, checked in by Christian Mauderer <christian.mauderer@…>, on 03/03/22 at 09:17:19

bsps/powerpc: Manual file header clean up

Updates #4625.

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