include "m8c.inc"
include "psocapi.inc"

export	_SPI_SEND

area		bss(RAM)
SpiBuf:		blk 1


area	text(ROM,REL)
_SPI_SEND:
	mov		[SpiBuf],a
;	mov		a,[SpiBuf]
	and		f,0xcf
	lcall	_SPIM_1_SendTxData
	
_SEND_WaitLP:
	lcall	_SPIM_1_bReadStatus
	and		a,0x20
	jz		_SEND_WaitLP
	ljmp	_SPIM_1_bReadRxData
__end_of_SPI_SEND:
	
	

