Code Search for Developers
 
 
  

FCPipe.cpp from Make Controller at Krugle


Show FCPipe.cpp syntax highlighted

/******************************************************************************
*
*      Company                   :  CIRIEL for ATMEL
*      Service Line              :  Product Devlopment
*      Project                   :  FingerChip
*      Task                      :  
*
*      Soft name                 :  FCPipe.cpp
*      Soft version              :  1.00
*
*      Description               :  This file contain the definition of the
*                                   virtual CFCPipe class 
*                  
*      Authors                   :  Pascal E
*
*      Platform                  :  PC
*      System                    :  Win 9X, 2K
*
*      Programming language      :  C ++
*      Operating System          :  Windows
*      Date of creation          :  08/30/2002
*
*      Prefix                    :
*      Code size (.o) (KB)       :
*
*      References                :
*
*      History                   :
*
*     Copyright (c) 
*     All rights reserved
*
******************************************************************************/

#include "stdafx.h"

#include "FCPipe.h"

#include "FC_Error.h"

#define SIZE_OF_DATA_SEND 250
#define BUFMAX 256
#define SIZEOFBUF 64


///////////////////////////////////////////////////////////////////////////////
ULONG CFCPipe::GetWriteCount()
{
  return m_WriteCount;
}

///////////////////////////////////////////////////////////////////////////////
void CFCPipe::ResetWriteCount()
{
  m_WriteCount = 0;
}

///////////////////////////////////////////////////////////////////////////////
ULONG CFCPipe::GetReadCount()
{
  return m_ReadCount;
}

///////////////////////////////////////////////////////////////////////////////
void CFCPipe::ResetReadCount()
{
  m_ReadCount = 0;
}

///////////////////////////////////////////////////////////////////////////////
short CFCPipe::Read(LPVOID pBuffer, ULONG ulBufferSize)
{
  short ret = ReadPipe(pBuffer, ulBufferSize);

  if(ret == FC_OK)
    m_ReadCount += ulBufferSize;

  return ret;
};

///////////////////////////////////////////////////////////////////////////////
short CFCPipe::Write(LPVOID pBuffer, ULONG ulBufferSize)
{
  short ret = WritePipe(pBuffer, ulBufferSize);

  if(ret == FC_OK)
    m_WriteCount += ulBufferSize;

  return ret;
};






See more files for this project here

Make Controller

The Make Controller is an open microcontroller platform for Makers of all kinds, by MakingThings. This project maintains the official firmware for the board and source for the software tools used with the board.

Project homepage: http://sourceforge.net/projects/makingthings
Programming language(s): C,C#,C++
License: other

  FCPipe.cpp
  FCPipe.h
  FCPipeUSB.cpp
  FCPipeUSB.h
  FC_Error.h
  SAM-BA.dll
  SAMBADLL.cpp
  SAMBADLL.h
  timer.cpp
  timer.h
  xmodem.cpp
  xmodem.h