~ubuntu-branches/ubuntu/saucy/dahdi-tools/saucy-proposed

« back to all changes in this revision

Viewing changes to xpp/mpptalk.h

  • Committer: Package Import Robot
  • Author(s): Jackson Doak
  • Date: 2013-08-25 12:48:37 UTC
  • mfrom: (2.1.7 sid)
  • Revision ID: package-import@ubuntu.com-20130825124837-wtefi7f9dsihg8is
Tags: 1:2.7.0-1ubuntu1
* Merge from debian. Remaining changes:
  - debian/control: Added gawk as dependency for dkms build
  - debian/control: Package dahdi Depends on dahdi-dkms | dahdi-source
  - debian/control: Set ubuntu maintainer    
  - added debian/dahdi.postinst
  - debian/control: Removed Uploaders field.
  - added debian/dahdi.postinst
  - added --error-handler=init_failed to debian/rules
  

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef MPP_FUNCS_H
 
2
#define MPP_FUNCS_H
 
3
/*
 
4
 * Written by Oron Peled <oron@actcom.co.il>
 
5
 * Copyright (C) 2008, Xorcom
 
6
 *
 
7
 * All rights reserved.
 
8
 *
 
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.
 
13
 *
 
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.
 
18
 *
 
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.
 
22
 *
 
23
 */
 
24
 
 
25
#include <stdint.h>
 
26
#include <stdio.h>
 
27
 
 
28
#include "mpp.h"
 
29
#include "astribank_usb.h"
 
30
 
 
31
struct astribank_device;
 
32
struct eeprom_table;
 
33
struct extrainfo;
 
34
struct capabilities;
 
35
struct capkey;
 
36
 
 
37
#define TIMEOUT 6000
 
38
 
 
39
/* high-level */
 
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,
 
49
                struct capkey *key);
 
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);
 
67
 
 
68
/*
 
69
 * Serial commands to FPGA
 
70
 */
 
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);
 
73
 
 
74
/*
 
75
 * Twinstar
 
76
 */
 
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);
 
82
 
 
83
const char *dev_dest2str(int dest);
 
84
 
 
85
#endif  /* MPP_FUNCS_H */