making if fail if there is no libusb-devel
[webos-internals:precomd.git] / src / pmux.c
1 /*
2  * pmux.c
3  *
4  *  Created on: Jun 24, 2009
5  *      Author: mike.gaffney
6  */
7
8 #include "pmux.h"
9
10
11 int pmux_packet_process( novacom_device_t *dev ) {
12     static uint32 seq_rx = 0 ;
13     static uint32 seq_tx = 0 ;
14     pmux_packet_t *pmux_packet = (pmux_packet_t *) &(dev->packet.payload) ;
15
16     if( pmux_packet->magic != PMUX_HEADER_MAGIC ) exit( 1 ) ;
17
18     if( seq_rx > pmux_packet->sequence_num ) exit( 1 ) ;
19
20     if( seq_tx > pmux_packet->sequence_num ) exit( 1 ) ;
21
22     // Check mode and process
23
24     // Check syn/ack and process
25
26     return 0 ;
27 }
28
29 int pmux_file_put( novacom_device_t *dev ) { return 0 ; }
30 int pmux_file_get( novacom_device_t *dev ) { return 0 ; }
31
32 int pmux_terminal_open( novacom_device_t *dev ) { return 0 ; }
33 int pmux_terminal_close( novacom_device_t *dev ) { return 0 ; }
34 int pmux_terminal_send( novacom_device_t *dev, char *cmd ) { return 0 ; }
35 int pmux_terminal_receive( novacom_device_t *dev, char *buf ) { return 0 ; }
36
37 int pmux_program_run( novacom_device_t *dev, uint32 argc, char **argv ) { return 0 ; }
38
39 int pmux_mem_put( novacom_device_t *dev, uint32 addr, uint32 data ) { return 0 ; }
40 int pmux_mem_boot( novacom_device_t *dev, uint32 addr ) { return 0 ; }