Changed read-only pointers to const in enc28j60

This commit is contained in:
Nicholas Humfrey 2016-05-23 12:54:16 +01:00
parent df5ff896a8
commit 65ff03537b
2 changed files with 5 additions and 5 deletions

View File

@ -207,7 +207,7 @@ setregbank(uint8_t new_bank)
}
/*---------------------------------------------------------------------------*/
static void
writedata(uint8_t *data, int datalen)
writedata(const uint8_t *data, int datalen)
{
int i;
enc28j60_arch_spi_select();
@ -477,7 +477,7 @@ reset(void)
}
/*---------------------------------------------------------------------------*/
void
enc28j60_init(uint8_t *mac_addr)
enc28j60_init(const uint8_t *mac_addr)
{
if(initialized) {
return;
@ -496,7 +496,7 @@ enc28j60_init(uint8_t *mac_addr)
}
/*---------------------------------------------------------------------------*/
int
enc28j60_send(uint8_t *data, uint16_t datalen)
enc28j60_send(const uint8_t *data, uint16_t datalen)
{
uint16_t dataend;

View File

@ -32,9 +32,9 @@
#ifndef ENC28J60_H
#define ENC28J60_H
void enc28j60_init(uint8_t *mac_addr);
void enc28j60_init(const uint8_t *mac_addr);
int enc28j60_send(uint8_t *data, uint16_t datalen);
int enc28j60_send(const uint8_t *data, uint16_t datalen);
int enc28j60_read(uint8_t *buffer, uint16_t bufsize);