mirror of
git://projects.qi-hardware.com/f32xbase.git
synced 2024-11-04 23:13:43 +02:00
6a4da0eaef
- f32x/c2-om.c: renamed C2 bitbang functions from om_* to c2_* - f32x/c2-om.c, f32x/c2-bitbang.c: moved most of the content of c2-om.c to c2-bitbang.c and #include c2-bitbang.c - f32x/Makefile: c2-om.o depends on c2-bitbang.c now
44 lines
991 B
C
44 lines
991 B
C
/*
|
|
* f32x/c2-om.c - Basic C2 messages, driver for Openmoko GTA01/GTA02+DebugV3
|
|
*
|
|
* Written 2008, 2010 by Werner Almesberger
|
|
* Copyright 2008, 2010 Werner Almesberger
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
|
|
#include <stdint.h>
|
|
#include <unistd.h>
|
|
|
|
#include "gpio-s3c24xx.h"
|
|
#include "c2-drv.h"
|
|
|
|
|
|
/*
|
|
* SPI GPIOs are the same on 2410 and 2442, so this should work on GTA01 and
|
|
* on GTA02.
|
|
*/
|
|
|
|
#define C2CK 4, 11 /* E13 = SPI_MISO0 */
|
|
#define C2D 4, 13 /* E12 = SPI_CLK0 */
|
|
|
|
|
|
#include "c2-bitbang.c"
|
|
|
|
|
|
/* ----- Operations -------------------------------------------------------- */
|
|
|
|
|
|
struct c2_ops c2_om = {
|
|
.init = c2_init,
|
|
.reset = c2_reset,
|
|
.addr_write = c2_addr_write,
|
|
.addr_read = c2_addr_read,
|
|
.data_write = c2_data_write,
|
|
.data_read = c2_data_read,
|
|
};
|