C8051F32x firmware infrastructure

Sign in or create your account | Project List | Help

C8051F32x firmware infrastructure Git Source Tree

Root/f32x/c2-drv.h

1/*
2 * f32x/c2-drv.h - C2 driver interface
3 *
4 * Written 2010 by Werner Almesberger
5 * Copyright 2010 Werner Almesberger
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13
14#ifndef C2_DRV_H
15#define C2_DRV_H
16
17
18#include <stdint.h>
19
20
21#define C2_DATA_READ 0
22#define C2_DATA_WRITE 1
23#define C2_ADDR_READ 2
24#define C2_ADDR_WRITE 3
25
26
27struct c2_ops {
28    void (*init)(int power);
29    void (*reset)(void);
30    void (*addr_write)(uint8_t addr);
31    uint8_t (*addr_read)(void);
32    void (*data_write)(uint32_t data, int bytes);
33    uint32_t (*data_read)(int bytes) ;
34};
35
36#endif /* !C2_DRV_H */
37

Archive Download this file

Branches:
master



interactive