spi is shared between the rtc and tsc2100
[Rockbox.git] / firmware / target / arm / tms320dm320 / spi-target.h
blob7123fc1c05c474056bad5259bc6c595416fc1437
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2007 by Catalin Patulea
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef SPI_TARGET_H
21 #define SPI_TARGET_H
23 #include <inttypes.h>
24 #include <stdbool.h>
26 enum SPI_target {
27 SPI_target_TSC2100 = 0,
28 SPI_target_RX5X348AB,
29 SPI_MAX_TARGETS,
32 void spi_init(void);
33 int spi_block_transfer(enum SPI_target target,
34 const uint8_t *tx_bytes, unsigned int tx_size,
35 uint8_t *rx_bytes, unsigned int rx_size);
37 #endif