dev/st7789_lcd #6
@@ -1,3 +1,6 @@
 | 
			
		||||
#ifndef __NRF52_SPI_H__
 | 
			
		||||
#define __NRF52_SPI_H__
 | 
			
		||||
 | 
			
		||||
int spi_open(const struct driver *drv);
 | 
			
		||||
int spi_close(const struct driver *drv);
 | 
			
		||||
 | 
			
		||||
@@ -16,3 +19,5 @@ static const struct driver_fp spi_fp = {
 | 
			
		||||
    .write = spi_write,
 | 
			
		||||
    .ioctl = NULL
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif
 | 
			
		||||
 
 | 
			
		||||
@@ -8,7 +8,6 @@
 | 
			
		||||
 | 
			
		||||
static inline int spi_transfer(uint32_t t);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
int spi_open(const struct driver *drv)
 | 
			
		||||
{
 | 
			
		||||
    assert(NULL != drv);
 | 
			
		||||
@@ -59,4 +58,3 @@ static inline int spi_transfer(uint32_t t)
 | 
			
		||||
    }
 | 
			
		||||
    r = NRF_SPI0->RXD;                    // in
 | 
			
		||||
    return (int)r;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user