#ifndef __SHARED_MEMORY_H__ #define __SHARED_MEMORY_H__ // Change this conditional #defines to get a new processor address // Address range must be within 'a' to 'z' #ifdef PROC_A #define ADDRESS_SELF 'a' #endif #ifdef PROC_B #define ADDRESS_SELF 'b' #endif #ifdef PROC_C #define ADDRESS_SELF 'c' #endif #ifdef PROC_X #define ADDRESS_SELF 'x' #endif #ifdef PROC_Y #define ADDRESS_SELF 'y' #endif #ifdef PROC_Z #define ADDRESS_SELF 'z' #endif // The number of characters that can be read from the input prompt // This value really just limits the size of chat messages, since // the other commands have a fixed maximum length #define COMMAND_BUFFER_SIZE 16 #define SHARED_MEMORY_BYTES 10 // Clear the local processor's shared memory (set it to zero) void SharedMemory_Zero(); // Display the contents of the local processor's shared memory void SharedMemory_View(); // Display the contents of the local memory location i void SharedMemory_Read(unsigned char i); // Write value to the local memory location i void SharedMemory_Write(unsigned char i, unsigned char value); // Display the last received message void SharedMemory_DisplayReceive(); // Display an error message for an unrecognized command void SharedMemory_CommandError(); // Initialize variables, serial interface, and I2C devices // Display program name, authors, etc... void SharedMemory_Init(); // Display help (describes command syntax) void SharedMemory_Help(); // Give the user a prompt to enter commands and parse the commands void SharedMemory_Input(); // Interrupt handler called from I2C when a receive has completed void SharedMemory_Receive(unsigned char* receiveBuffer, unsigned char size); #endif // __SHARED_MEMORY_H__