HID özelliğinde eprom okuma

Başlatan mtoy, 07 Kasım 2010, 11:50:03

mtoy

arkadaşlar aşağıdaki örneği buldum. gayet güzel çalışıyor ancak
/* Read the Serial Number back into a RAM buffer */
            E2PROM_E2Read( 0, abSerialNumberBuffer, 10 );
burada okuttuğum abSerialNumberBuffer yu program aracılığı ile nasıl okutabilirim



//----------------------------------------------------------------------------
// C main line
//----------------------------------------------------------------------------

#include <m8c.h>        // part specific constants and macros
#include "PSoCAPI.h"    // PSoC API definitions for all User Modules
#include <E2PROM.h>

/* Initialize a RAM buffer with default Serial Number */
BYTE  abInitialSerialNumber[] = {'0','1','2','3','4','5','6','7','8','9' };
BYTE  abSerialNumberBuffer[10];
void SerialNumberExample(void);

void main(void)
{
	M8C_EnableGInt ; // Uncomment this line to enable Global Interrupts
	// Insert your main routine code here.
	USB_Start(0);     //Start USB Operation using device 0  
	E2PROM_Start();
	SerialNumberExample();
	//E2Read();
	while (0)
	{}
   
}

void SerialNumberExample(void)
{
      BYTE bError;
      
      /* Write the Serial Number - assume temp of 25C */
      bError = E2PROM_bE2Write(0,abInitialSerialNumber, 64, 25);
      
      if ( bError == E2PROM_NOERROR )
      {
      
            /* Read the Serial Number back into a RAM buffer */
            E2PROM_E2Read( 0, abSerialNumberBuffer, 10 );
      }

}

mtoy

arkadaşlar lütfen yardım edin