RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
powerpc
mpc55xxevb
include
mpc55xx
dspi.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
10
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
40
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
49
extern
"C"
{
50
#endif
/* __cplusplus */
51
52
struct
DSPI_tag
;
53
54
typedef
struct
{
55
edma_channel_context
edma;
56
rtems_id
id;
57
}
mpc55xx_dspi_edma_entry
;
58
62
typedef
struct
{
66
rtems_libi2c_bus_t
bus
;
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
100
mpc55xx_dspi_edma_entry
edma_transmit
;
101
107
mpc55xx_dspi_edma_entry
edma_push
;
108
114
mpc55xx_dspi_edma_entry
edma_receive
;
115
119
uint32_t
idle_char
;
120
124
uint32_t
baud
;
125
}
mpc55xx_dspi_bus_entry
;
126
130
#define MPC55XX_DSPI_NUMBER 4
131
135
extern
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_table
mpc55xx_dspi_bus_entry mpc55xx_dspi_bus_table[MPC55XX_DSPI_NUMBER]
Table with bus driver entries.
Definition
dspi.c:683
rtems_id
Objects_Id rtems_id
This type represents RTEMS object identifiers.
Definition
types.h:94
libi2c.h
Legacy I2C Library.
edma.h
Enhanced Direct Memory Access (eDMA).
DSPI_tag
Definition
fsl-mpc551x.h:238
edma_channel_context
Definition
edma.h:173
mpc55xx_dspi_bus_entry
LibI2C bus driver entry.
Definition
dspi.h:62
mpc55xx_dspi_bus_entry::regs
volatile struct DSPI_tag * regs
Hardware registers.
Definition
dspi.h:83
mpc55xx_dspi_bus_entry::push_data
union DSPI_PUSHR_tag push_data
Data for the Push Register.
Definition
dspi.h:93
mpc55xx_dspi_bus_entry::bus
rtems_libi2c_bus_t bus
Standard bus driver fields.
Definition
dspi.h:66
mpc55xx_dspi_bus_entry::idle_char
uint32_t idle_char
Idle character transmitted in read only mode.
Definition
dspi.h:119
mpc55xx_dspi_bus_entry::table_index
unsigned table_index
Index in the bus table: mpc55xx_dspi_bus_table.
Definition
dspi.h:71
mpc55xx_dspi_bus_entry::baud
uint32_t baud
Current baud.
Definition
dspi.h:124
mpc55xx_dspi_bus_entry::bus_number
unsigned bus_number
Bus number (available after rtems_libi2c_register_bus()).
Definition
dspi.h:78
mpc55xx_dspi_bus_entry::edma_transmit
mpc55xx_dspi_edma_entry edma_transmit
eDMA entry for transmission.
Definition
dspi.h:100
mpc55xx_dspi_bus_entry::edma_receive
mpc55xx_dspi_edma_entry edma_receive
eDMA entry for receiving.
Definition
dspi.h:114
mpc55xx_dspi_bus_entry::edma_push
mpc55xx_dspi_edma_entry edma_push
eDMA entry for push data generation.
Definition
dspi.h:107
mpc55xx_dspi_bus_entry::master
bool master
Selects SPI master or slave mode.
Definition
dspi.h:88
mpc55xx_dspi_edma_entry
Definition
dspi.h:54
DSPI_PUSHR_tag
Definition
fsl-mpc564xL.h:16672
Generated by
1.18.0