mirror of
git://projects.qi-hardware.com/f32xbase.git
synced 2024-11-04 23:13:43 +02:00
de75051afa
- f32x/Makefile: added support for building for different targets (for now, just TARGET=om) - f32x/c2-drv.h: interface for C2 drivers - f32x/c2-om.c: updated title - f32x/c2-om.c: renamed all c2_* to om_* and made them "static" - f32x/c2-om.c (c2_om): driver operations - f32x/c2.c: call driver operations - f32x/c2.h: moved protocol constants to c2-drv.h
37 lines
768 B
C
37 lines
768 B
C
/*
|
|
* f32x/c2-drv.h - C2 driver interface
|
|
*
|
|
* Written 2010 by Werner Almesberger
|
|
* Copyright 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.
|
|
*/
|
|
|
|
|
|
#ifndef C2_DRV_H
|
|
#define C2_DRV_H
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
#define C2_DATA_READ 0
|
|
#define C2_DATA_WRITE 1
|
|
#define C2_ADDR_READ 2
|
|
#define C2_ADDR_WRITE 3
|
|
|
|
|
|
struct c2_ops {
|
|
void (*init)(void);
|
|
void (*reset)(void);
|
|
void (*addr_write)(uint8_t addr);
|
|
uint8_t (*addr_read)(void);
|
|
void (*data_write)(uint32_t data, int bytes);
|
|
uint32_t (*data_read)(int bytes) ;
|
|
};
|
|
|
|
#endif /* !C2_DRV_H */
|