pmpmasterwrite.c

来自「基於 c51/8051 的 nand Flash Memory HY27US08」· C语言 代码 · 共 39 行

C
39
字号
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include "pmp.h"



#ifdef _PPI_PMP_V1


/******************************************************************************
 * Function:        PMPMasterWrite
 *
 * PreCondition:    None
 *
 * Input:           value to write to external device
 *
 * Output:          None
 *
 * Side Effects:    None
 *
 * Overview:        PIC24: if 8-bit data mode is selected, the data appears on 8
 *					data lines.  If 16-bit data mode, the lower 8 bits of data
 *					are written first, followed by the upper 8 bits of data.
 * 					
 * Note:			Use in MASTER mode 1 or 2, MODE[1:0] = 10, 11 
 *****************************************************************************/
void PMPMasterWrite(WORD value)
{
	while(PMMODEbits.BUSY);
   	
	PMDIN1 = (WORD) value;
}

/* end of file */
#else
#warning "Does not build on this target"
#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?