07.04.2013 Views

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

MPLAB C Compiler for PIC24 MCUs and dsPIC DSCs ... - Microchip

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

ead_external16<br />

Additional C Pointer Types<br />

unsigned int __read_external16(unsigned int address,<br />

unsigned int memory_space)<br />

Read 16 bits from external memory space memory_space starting from address<br />

address. The compiler would like to call this function if trying to access an 16-bit sized<br />

object.<br />

read_external32<br />

unsigned long __read_external32(unsigned int address,<br />

unsigned int memory_space)<br />

Read 32 bits from external memory space memory_space starting from address<br />

address. The compiler would like to call this function if trying to access a 32-bit sized<br />

object, such as a long or float type.<br />

read_external64<br />

unsigned long long __read_external64(unsigned int address,<br />

unsigned int memory_space)<br />

Read 64 bits from external memory space memory_space starting from address<br />

address. The compiler would like to call this function if trying to access a 64-bit sized<br />

object, such as a long long or long double type.<br />

6.4.3.2 FUNCTIONS FOR WRITING<br />

write_external<br />

void __write_external(unsigned int address,<br />

unsigned int memory_space,<br />

void *buffer,<br />

unsigned int len)<br />

This function is a generic Write function <strong>and</strong> will be called if one of the next functions<br />

are required but not defined. This function should per<strong>for</strong>m the steps necessary to write<br />

len bytes of memory from the buffer to the external memory named memory_space<br />

starting at address address.<br />

write_external8<br />

void __write_external8(unsigned int address,<br />

unsigned int memory_space,<br />

unsigned char data)<br />

Write 8 bits of data to external memory space memory_space starting from address<br />

address. The compiler would like to call this function if trying to write an 8-bit sized<br />

object.<br />

write_external16<br />

void __write_external16(unsigned int address,<br />

unsigned int memory_space,<br />

unsigned int data)<br />

Write 16 bits of data to external memory space memory_space starting from address<br />

address. The compiler would like to call this function if trying to write an 16-bit sized<br />

object.<br />

© 2008 <strong>Microchip</strong> Technology Inc. DS51284H-page 87

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!