source: trunk/modules/vci_spi/include/soclib/vcispi.h @ 571

Last change on this file since 571 was 561, checked in by bouyer, 11 years ago

I was wrong, we really want 8bits for SPI_CTRL_CHAR_LEN_MASK

File size: 1.6 KB
RevLine 
[551]1/*
2 * SOCLIB_LGPL_HEADER_BEGIN
3 *
4 * This file is part of SoCLib, GNU LGPLv2.1.
5 *
6 * SoCLib is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU Lesser General Public License as published
8 * by the Free Software Foundation; version 2.1 of the License.
9 *
10 * SoCLib is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with SoCLib; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 * 02110-1301 USA
19 *
20 * SOCLIB_LGPL_HEADER_END
21 *
22 * Copyright (c) UPMC, Lip6, Asim
23 *         alain greiner
24 *
25 * Maintainers: alain
26 */
27#ifndef SPISD_H
28#define SPISD_H
29
30enum SoclibBlockDeviceRegisters {
31    SPI_DATA_TXRX0,
32    SPI_DATA_TXRX1,
33    SPI_DATA_TXRX2,
34    SPI_DATA_TXRX3,
35    SPI_CTRL,
36    SPI_DIVIDER,
37    SPI_SS
38};
39
40#define SPI_CTRL_CPOL           (1 << 15) /* Clock polarity                */
41#define SPI_CTRL_CPHA           (1 << 14) /* Clock phase                   */
42#define SPI_CTRL_IE_EN          (1 << 12) /* Interrupt Enable              */
43// 9-11 reserved
44#define SPI_CTRL_GO_BSY         (1 << 8 ) /* Start the transfer            */
[561]45#define SPI_CTRL_CHAR_LEN_MASK  (0xFF   ) /* Bits transmited in 1 transfer */
[551]46
47#endif /* SPISD_H */
48
49// Local Variables:
50// tab-width: 4
51// c-basic-offset: 4
52// c-file-offsets:((innamespace . 0)(inline-open . 0))
53// indent-tabs-mode: nil
54// End:
55
56// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
57
Note: See TracBrowser for help on using the repository browser.