Statistics
| Branch: | Tag: | Revision:

root / firmware / microblaze / apps / test_db_spi.c @ aab51fa4

History | View | Annotate | Download (1 KB)

1
/* -*- c++ -*- */
2
/*
3
 * Copyright 2008 Free Software Foundation, Inc.
4
 *
5
 * This program is free software: you can redistribute it and/or modify
6
 * it under the terms of the GNU General Public License as published by
7
 * the Free Software Foundation, either version 3 of the License, or
8
 * (at your option) any later version.
9
 *
10
 * This program is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 * GNU General Public License for more details.
14
 *
15
 * You should have received a copy of the GNU General Public License
16
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 */
18

    
19
#include <u2_init.h>
20
#include <nonstdio.h>
21
#include <hal_io.h>
22
#include <spi.h>
23

    
24
int
25
main(void)
26
{
27
  u2_init();
28

    
29
  puts("\ntest_db_spi");
30

    
31
  while(1){
32
    spi_transact(SPI_TXONLY, SPI_SS_RX_DB, 0xCC33, 16, SPIF_PUSH_FALL);
33
    spi_transact(SPI_TXONLY, SPI_SS_TX_DB, 0x33CC, 16, SPIF_PUSH_FALL);
34
  }
35
}