Example #1
0
I32U Tcc353xGetStreamBuffer(I32S _moduleIndex, I08U * _buff, I32U _size)
{
#if defined (USE_LGE_RING_BUFFER) && !defined (_I2C_STS_)
	I32U tsSize = 0;
	I32U totalSize = 0;

	totalSize = mbt_dataring_avail(RingBufId);

	if (totalSize < 188) {
		return 0;
	}

	if(_size > totalSize) {
		tsSize = totalSize;
	} else {
		tsSize = _size;
	}

	tsSize = mbt_dataring_read(RingBufId, _buff, tsSize);

	return tsSize;
#else
	return 0;
#endif
}
I32U Tcc353xGetStreamBuffer(I32S _moduleIndex, I08U * _buff, I32U _size)
{
	I32U tsSize = 0;
	I32U totalSize = 0;

	totalSize = mbt_dataring_avail(RingBufId);

	if (totalSize < 188) {
		return 0;
	}

	if(_size > totalSize) {
		tsSize = totalSize;
	} else {
		tsSize = _size;
	}

	tsSize = mbt_dataring_read(RingBufId, _buff, tsSize);

	return tsSize;
}