RTEMS 6.1-rc4
Loading...
Searching...
No Matches
dspi.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/*
12 * Copyright (c) 2008 embedded brains GmbH & Co. KG
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 * 1. Redistributions of source code must retain the above copyright
17 * notice, this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright
19 * notice, this list of conditions and the following disclaimer in the
20 * documentation and/or other materials provided with the distribution.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 */
34
41#ifndef LIBCPU_POWERPC_MPC55XX_DSPI_H
42#define LIBCPU_POWERPC_MPC55XX_DSPI_H
43
44#include <rtems/libi2c.h>
45
46#include <mpc55xx/edma.h>
47
48#ifdef __cplusplus
49extern "C" {
50#endif /* __cplusplus */
51
52struct DSPI_tag;
53
54typedef struct {
56 rtems_id id;
58
62typedef struct {
67
71 unsigned table_index;
72
78 unsigned bus_number;
79
83 volatile struct DSPI_tag *regs;
84
88 bool master;
89
93 union DSPI_PUSHR_tag push_data;
94
101
108
115
119 uint32_t idle_char;
120
124 uint32_t baud;
126
130#define MPC55XX_DSPI_NUMBER 4
131
135extern mpc55xx_dspi_bus_entry mpc55xx_dspi_bus_table [ /* MPC55XX_DSPI_NUMBER */ ];
136
137#ifdef __cplusplus
138}
139#endif /* __cplusplus */
140
141#endif /* LIBCPU_POWERPC_MPC55XX_DSPI_H */
mpc55xx_dspi_bus_entry mpc55xx_dspi_bus_table[]
Table with bus driver entries.
Definition: dspi.c:683
Objects_Id rtems_id
This type represents RTEMS object identifiers.
Definition: types.h:94
Legacy I2C Library.
Enhanced Direct Memory Access (eDMA).
Definition: fsl-mpc551x.h:238
Definition: edma.h:173
LibI2C bus driver entry.
Definition: dspi.h:62
volatile struct DSPI_tag * regs
Hardware registers.
Definition: dspi.h:83
rtems_libi2c_bus_t bus
Standard bus driver fields.
Definition: dspi.h:66
uint32_t idle_char
Idle character transmitted in read only mode.
Definition: dspi.h:119
unsigned table_index
Index in the bus table: mpc55xx_dspi_bus_table.
Definition: dspi.h:71
uint32_t baud
Current baud.
Definition: dspi.h:124
unsigned bus_number
Bus number (available after rtems_libi2c_register_bus()).
Definition: dspi.h:78
mpc55xx_dspi_edma_entry edma_transmit
eDMA entry for transmission.
Definition: dspi.h:100
mpc55xx_dspi_edma_entry edma_receive
eDMA entry for receiving.
Definition: dspi.h:114
mpc55xx_dspi_edma_entry edma_push
eDMA entry for push data generation.
Definition: dspi.h:107
bool master
Selects SPI master or slave mode.
Definition: dspi.h:88
Definition: dspi.h:54
Definition: libi2c.h:163
Definition: fsl-mpc564xL.h:16672