mirror of
git://projects.qi-hardware.com/nn-usb-fpga.git
synced 2025-01-06 02:40:16 +02:00
Change examples to new Hardware
This commit is contained in:
parent
79251ddaca
commit
542c928301
@ -23,8 +23,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
#include "jz47xx_gpio.h"
|
||||
#include "jz47xx_mmap.h"
|
||||
|
||||
#define TEST_PORT JZ_GPIO_PORT_B
|
||||
#define TEST_PIN 26
|
||||
#define CS2_PORT JZ_GPIO_PORT_B
|
||||
#define CS2_PIN 26
|
||||
|
||||
int
|
||||
main ()
|
||||
@ -33,15 +33,15 @@ main ()
|
||||
JZ_PIO *pio;
|
||||
JZ_REG *virt_addr;
|
||||
|
||||
pio = jz_gpio_map (TEST_PORT);
|
||||
jz_gpio_as_func (pio, TEST_PIN, 0);
|
||||
pio = jz_gpio_map (CS2_PORT);
|
||||
jz_gpio_as_func (pio, CS2_PIN, 0);
|
||||
|
||||
virt_addr = (JZ_REG *) jz_mmap (0x13010000) + 0x18;
|
||||
|
||||
if (*virt_addr != 0xFFF7700)
|
||||
{ // 0 WS, 8 bits
|
||||
*virt_addr = 0xFFF7700;
|
||||
printf ("Configuring CS3 16 bits and 1 WS\n");
|
||||
printf ("Configuring CS2 8 bits \n");
|
||||
}
|
||||
else
|
||||
printf ("CS3, already configured\n");
|
||||
|
@ -23,8 +23,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
#include "jz47xx_gpio.h"
|
||||
|
||||
#define TEST_PORT JZ_GPIO_PORT_D
|
||||
#define TEST_PIN 23
|
||||
#define TEST_PORT JZ_GPIO_PORT_C
|
||||
#define TEST_PIN 17
|
||||
|
||||
int
|
||||
main ()
|
||||
|
Loading…
Reference in New Issue
Block a user