MakingThings
  • Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

usb.h

00001 /*********************************************************************************
00002 
00003  Copyright 2006-2008 MakingThings
00004 
00005  Licensed under the Apache License, 
00006  Version 2.0 (the "License"); you may not use this file except in compliance 
00007  with the License. You may obtain a copy of the License at
00008 
00009  http://www.apache.org/licenses/LICENSE-2.0 
00010  
00011  Unless required by applicable law or agreed to in writing, software distributed
00012  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
00013  CONDITIONS OF ANY KIND, either express or implied. See the License for
00014  the specific language governing permissions and limitations under the License.
00015 
00016 *********************************************************************************/
00017 
00018 /*
00019   usb.h
00020 
00021 */
00022 
00023 #ifndef USB_H
00024 #define USB_H
00025 
00026 #include "config.h"
00027 
00028 #define MAX_INCOMING_SLIP_PACKET 400
00029 #define MAX_OUTGOING_SLIP_PACKET 600
00030 
00031 typedef struct
00032 {
00033   char slipSendBuffer[ MAX_OUTGOING_SLIP_PACKET ];
00034   char slipReadBuffer[ MAX_INCOMING_SLIP_PACKET ];
00035 } Usb_;
00036 
00037 int Usb_SetActive( int state );
00038 int Usb_GetActive( void );
00039 
00040 int Usb_Write( char *buffer, int length );
00041 int Usb_Read(char *buffer, int length);
00042 
00043 int Usb_SlipSend( char* buffer, int length );
00044 int Usb_SlipReceive( char* buffer, int length );
00045 
00046 // OSC Interface
00047 const char* UsbOsc_GetName( void );
00048 int UsbOsc_ReceiveMessage( int channel, char* message, int length );
00049 
00050 #endif

The Make Controller Kit is an open source project maintained by MakingThings.
MakingThings code is released under the Apache 2.0 license.
Bug tracker, development wiki and status can be found at http://dev.makingthings.com.
This document was last updated on 18 May 2009.