/***************************************************************************** * FUNCTION: WriteWFROMArray * * RETURNS: None * * PARAMS: * regId -- Raw register being written to * pBuf -- pointer to array of bytes being written * length -- number of bytes in pBuf * * NOTES: Writes a data block (in ROM) to specified raw register. This function * is only needed for the Microchip PIC18. *****************************************************************************/ void WriteWFROMArray(UINT8 regId, ROM UINT8 *p_Buf, UINT16 length) { g_txBuf[0] = regId; WF_SpiEnableChipSelect(); /* output cmd byte */ WFSpiTxRx(g_txBuf, 1, g_rxBuf, 1); /* output data array bytes */ WFSpiTxRx_Rom(p_Buf, length, g_rxBuf, 1); WF_SpiDisableChipSelect(); }
/***************************************************************************** * FUNCTION: WriteWFROMArray * * RETURNS: None * * PARAMS: * regId -- Raw register being written to * pBuf -- pointer to array of bytes being written * length -- number of bytes in pBuf * * NOTES: Writes a data block (in ROM) to specified raw register. This function * is only needed for the Microchip PIC18. *****************************************************************************/ void WriteWFROMArray(uint8_t regId, ROM uint8_t *p_Buf, uint16_t length) { g_txBuf[0] = regId; WF_SpiEnableChipSelect(); /* output cmd byte */ WFSpiTxRx(g_txBuf, 1, g_rxBuf, 1); /* output data array bytes */ WFSpiTxRx_Rom(p_Buf, length, g_rxBuf, 1); WF_SpiDisableChipSelect(); }