4
* Written by Oron Peled <oron@actcom.co.il>
5
* Copyright (C) 2008, Xorcom
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2 of the License, or
12
* (at your option) any later version.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29
#include "astribank_usb.h"
31
struct astribank_device;
40
struct astribank_device *mpp_init(const char devpath[], int iface_num);
41
void mpp_exit(struct astribank_device *astribank);
42
int mpp_proto_query(struct astribank_device *astribank);
43
int mpp_status_query(struct astribank_device *astribank);
44
int mpp_eeprom_set(struct astribank_device *astribank, const struct eeprom_table *et);
45
int mpp_renumerate(struct astribank_device *astribank);
46
int mpp_caps_get(struct astribank_device *astribank,
47
struct eeprom_table *et,
48
struct capabilities *cap,
50
int mpp_caps_set(struct astribank_device *astribank,
51
const struct eeprom_table *eeprom_table,
52
const struct capabilities *capabilities,
53
const struct capkey *key);
54
int mpp_extrainfo_get(struct astribank_device *astribank, struct extrainfo *info);
55
int mpp_extrainfo_set(struct astribank_device *astribank, const struct extrainfo *info);
56
int mpp_eeprom_blk_rd(struct astribank_device *astribank, uint8_t *buf, uint16_t offset, uint16_t len);
57
int mpp_send_start(struct astribank_device *astribank, int dest, const char *ihex_version);
58
int mpp_send_end(struct astribank_device *astribank);
59
int mpp_send_seg(struct astribank_device *astribank, const uint8_t *data, uint16_t offset, uint16_t len);
60
int mpp_reset(struct astribank_device *astribank, int full_reset);
61
int mpp_serial_cmd(struct astribank_device *astribank, const uint8_t *in, uint8_t *out, uint16_t len);
62
void show_eeprom(const struct eeprom_table *eprm, FILE *fp);
63
void show_capabilities(const struct capabilities *capabilities, FILE *fp);
64
void show_astribank_status(struct astribank_device *astribank, FILE *fp);
65
void show_extrainfo(const struct extrainfo *extrainfo, FILE *fp);
66
int twinstar_show(struct astribank_device *astribank, FILE *fp);
69
* Serial commands to FPGA
71
int mpps_card_info(struct astribank_device *astribank, int unit, uint8_t *card_type, uint8_t *card_status);
72
int mpps_stat(struct astribank_device *astribank, int unit, uint8_t *maincard_version, uint8_t *status);
77
int mpp_tws_watchdog(struct astribank_device *astribank);
78
int mpp_tws_setwatchdog(struct astribank_device *astribank, int yes);
79
int mpp_tws_powerstate(struct astribank_device *astribank);
80
int mpp_tws_portnum(struct astribank_device *astribank);
81
int mpp_tws_setportnum(struct astribank_device *astribank, uint8_t portnum);
83
const char *dev_dest2str(int dest);
85
#endif /* MPP_FUNCS_H */