43 #if (PARTNO == RM331x) || \ 46 static bool DISPLAY_OUTPUT = 0;
48 static void debugOn() {DISPLAY_OUTPUT = 1;};
49 static void debugOff() {DISPLAY_OUTPUT = 0;};
142 uint32_t totalBytes = txNumBytes + 3;
145 for(i = 3, j = 0; i < totalBytes; i++, j++)
182 printf(
"\n\n\nPerformed hardware reset.\n");
void monetaWaitOnReady()
: Wait while Read/Busy Status bit in SRB is 1 (device is busy).
#define CMD_MONETA_UDPD_MODE1
void SPI_JEDECReset()
Performs a JEDEC reset on the SPI device.
#define CMD_MONETA_WRITE_DISABLE
void printSPIExchange(uint8_t *txBuffer, uint32_t txNumBytes, uint8_t *rxBuffer, uint32_t rxNumBytes)
Prints the byte array in hexadecimal with a formatted output. Indicates what bytes were sent...
void monetaReadArray(uint16_t address, uint8_t *rxBuffer, uint32_t rxNumBytes)
OPCODE: 0x03 Reads rxNumBytes starting from location 'address' and stores the data in the byte arra...
#define CMD_MONETA_READ_SRB1
void monetaHardwareReset()
Exits Ultra Deep Power Down mode using the hardware reset option.
#define CMD_MONETA_WRITE_SRB2
#define CMD_MONETA_WRITE_ARRAY
void monetaWriteSRB2(uint8_t data)
OPCODE: 0x31 Writes the value in data to status register byte 2.
Declarations of Moneta functions.
void monetaWriteDisable()
OPCODE: 0x04 Sends opcode to disable writing.
#define CMD_MONETA_WRITE_SRB1
#define CMD_MONETA_WRITE_ENABLE
void monetaReadMID(uint8_t *rxBuffer)
OPCODE: 0x9F Reads the manufacturer ID and stores the data in rxBuffer.
void monetaWriteSRB1(uint8_t data)
OPCODE: 0x01 Writes the value in data to status register byte 1.
void SPI_Delay(uint32_t delayTime)
Performs a delayTime number of NOPs.
void monetaWriteEnable()
OPCODE: 0x06 Sends opcode to enable writing.
void monetaReadSR(uint8_t *rxBuffer)
OPCODE: 0x05 Reads the value in the status registers.
#define CMD_MONETA_READ_MID
void monetaWriteArray(uint16_t address, uint8_t *txBuffer, uint32_t txNumBytes)
OPCODE: 0x02 Writes txNumBytes bytes of data starting at the address indicated by address...
#define CMD_MONETA_READ_ARRAY
void monetaUDPDMode1()
OPCODE: 0x79 Sends the device into Ultra Deep Power Down Mode 1. Exit UDPD Mode 1 by power cycling ...
void SPI_Exchange(uint8_t *txBuffer, uint32_t txNumBytes, uint8_t *rxBuffer, uint32_t rxNumBytes, uint32_t dummyNumBytes)
Sends and receives bytes based on the function parameters. MISO and MOSI fill their standard SPI role...
uint8_t txMonetaInternalBuffer[MAXIMUM_TX_BYTES]