RTEMS: bsps/powerpc/mpc55xxevb/include/mpc55xx/dspi.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
dspi.h
Go to the documentation of this file.
1
9/*
10 * Copyright (c) 2008
11 * Embedded Brains GmbH
12 * Obere Lagerstr. 30
13 * D-82178 Puchheim
14 * Germany
15 * rtems@embedded-brains.de
16 *
17 * The license and distribution terms for this file may be
18 * found in the file LICENSE in this distribution or at
19 * http://www.rtems.org/license/LICENSE.
20 */
21
28#ifndef LIBCPU_POWERPC_MPC55XX_DSPI_H
29#define LIBCPU_POWERPC_MPC55XX_DSPI_H
30
31#include <rtems/libi2c.h>
32
33#include <mpc55xx/edma.h>
34
35#ifdef __cplusplus
36extern "C" {
37#endif /* __cplusplus */
38
39struct DSPI_tag;
40
41 typedef struct {
42 edma_channel_context edma;
43 rtems_id id;
44} mpc55xx_dspi_edma_entry;
45
49 typedef struct {
53 rtems_libi2c_bus_t bus;
54
58 unsigned table_index;
59
65 unsigned bus_number;
66
70 volatile struct DSPI_tag *regs;
71
75 bool master;
76
80 union DSPI_PUSHR_tag push_data;
81
87 mpc55xx_dspi_edma_entry edma_transmit;
88
94 mpc55xx_dspi_edma_entry edma_push;
95
101 mpc55xx_dspi_edma_entry edma_receive;
102
106 uint32_t idle_char;
107
111 uint32_t baud;
112} mpc55xx_dspi_bus_entry;
113
117#define MPC55XX_DSPI_NUMBER 4
118
122extern mpc55xx_dspi_bus_entry mpc55xx_dspi_bus_table [ /* MPC55XX_DSPI_NUMBER */ ];
123
124#ifdef __cplusplus
125}
126#endif /* __cplusplus */
127
128#endif /* LIBCPU_POWERPC_MPC55XX_DSPI_H */
mpc55xx_dspi_bus_table
mpc55xx_dspi_bus_entry mpc55xx_dspi_bus_table[]
Table with bus driver entries.
Definition: dspi.c:670
edma.h
Enhanced Direct Memory Access (eDMA).
rtems_id
Objects_Id rtems_id
Used to manage and manipulate RTEMS object identifiers.
Definition: types.h:83
libi2c.h
Legacy I2C Library.
DSPI_tag
Definition: fsl-mpc551x.h:244
edma_channel_context
Definition: edma.h:160
mpc55xx_dspi_bus_entry
LibI2C bus driver entry.
Definition: dspi.h:49
mpc55xx_dspi_bus_entry::regs
volatile struct DSPI_tag * regs
Hardware registers.
Definition: dspi.h:70
mpc55xx_dspi_bus_entry::bus
rtems_libi2c_bus_t bus
Standard bus driver fields.
Definition: dspi.h:53
mpc55xx_dspi_bus_entry::idle_char
uint32_t idle_char
Idle character transmitted in read only mode.
Definition: dspi.h:106
mpc55xx_dspi_bus_entry::table_index
unsigned table_index
Index in the bus table: mpc55xx_dspi_bus_table.
Definition: dspi.h:58
mpc55xx_dspi_bus_entry::baud
uint32_t baud
Current baud.
Definition: dspi.h:111
mpc55xx_dspi_bus_entry::bus_number
unsigned bus_number
Bus number (available after rtems_libi2c_register_bus()).
Definition: dspi.h:65
mpc55xx_dspi_bus_entry::edma_transmit
mpc55xx_dspi_edma_entry edma_transmit
eDMA entry for transmission.
Definition: dspi.h:87
mpc55xx_dspi_bus_entry::edma_receive
mpc55xx_dspi_edma_entry edma_receive
eDMA entry for receiving.
Definition: dspi.h:101
mpc55xx_dspi_bus_entry::edma_push
mpc55xx_dspi_edma_entry edma_push
eDMA entry for push data generation.
Definition: dspi.h:94
mpc55xx_dspi_bus_entry::master
bool master
Selects SPI master or slave mode.
Definition: dspi.h:75
mpc55xx_dspi_edma_entry
Definition: dspi.h:41
rtems_libi2c_bus_t_
Definition: libi2c.h:163
DSPI_PUSHR_tag
Definition: fsl-mpc564xL.h:16678