mirror of
https://github.com/marqs85/ossc
synced 2025-04-09 22:56:34 +03:00
i2c_opencores.[ch], spi_io.[ch]: Improve const correctness.
This commit is contained in:
parent
cd77713255
commit
556140dd62
@ -17,7 +17,7 @@ int I2C_start(alt_u32 base, alt_u32 add, alt_u32 read);
|
||||
alt_u32 I2C_read(alt_u32 base,alt_u32 last);
|
||||
alt_u32 I2C_write(alt_u32 base,alt_u8 data, alt_u32 last);
|
||||
void SPI_read(alt_u32 base, alt_u8 *rdata, int len);
|
||||
void SPI_write(alt_u32 base, alt_u8 *wdata, int len);
|
||||
void SPI_write(alt_u32 base, const alt_u8 *wdata, int len);
|
||||
#define I2C_OK (0)
|
||||
#define I2C_ACK (0)
|
||||
#define I2C_NOACK (1)
|
||||
|
@ -197,7 +197,7 @@ void SPI_read(alt_u32 base, alt_u8 *rdata, int len)
|
||||
}
|
||||
}
|
||||
|
||||
void SPI_write(alt_u32 base, alt_u8 *wdata, int len)
|
||||
void SPI_write(alt_u32 base, const alt_u8 *wdata, int len)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -15,7 +15,7 @@ void SPI_Init (void) {
|
||||
I2C_init(SD_SPI_BASE,ALT_CPU_FREQ,400000);
|
||||
}
|
||||
|
||||
void SPI_W(BYTE *wd, int len) {
|
||||
void SPI_W(const BYTE *wd, int len) {
|
||||
SPI_write(SD_SPI_BASE, wd, len);
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ void SPI_R (BYTE *rd, int len);
|
||||
\param *wd Pointer to array which holds the bytes.
|
||||
\param len Length of the array.
|
||||
*/
|
||||
void SPI_W (BYTE *wd, int len);
|
||||
void SPI_W (const BYTE *wd, int len);
|
||||
|
||||
/**
|
||||
\brief Read a single byte.
|
||||
|
Loading…
Reference in New Issue
Block a user