- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am going around in circles with the UDBs - how do I get data (3 bytes/24 bits in this case) from a programme into a FIFO (without using Ax or Dx)?
A trivial question, I know!
Thank you,
Mike
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
An example is found in the Shift Register component.
The ShiftReg_WriteData() function is used to store a 24bit value into a 24bit width FIFO register using the CY_SET_REG24() macro.
cystatus ShiftReg_WriteData(uint32 shiftData)
{
cystatus result;
result = CYRET_INVALID_STATE;
/* Writes data into the input FIFO if it is not FULL */
if(ShiftReg_RET_FIFO_FULL != (ShiftReg_GetFIFOStatus(ShiftReg_IN_FIFO)))
{
CY_SET_REG24(ShiftReg_IN_FIFO_VAL_LSB_PTR, shiftData);
result = CYRET_SUCCESS;
}
return(result);
}
The register address ShiftReg_IN_FIFO_VAL_LSB_PTR is defined in the header file as follows.
#define ShiftReg_IN_FIFO_VAL_LSB_PTR ( (reg32 *) \
ShiftReg_bSR_sC24_BShiftRegDp_u0__F0_REG )
Regards,
Noriaki