Merge pull request #1673 from njh/enc28j60_init_const
Changed read-only pointers to const in enc28j60
This commit is contained in:
commit
7503628077
|
@ -207,7 +207,7 @@ setregbank(uint8_t new_bank)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
writedata(uint8_t *data, int datalen)
|
writedata(const uint8_t *data, int datalen)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
enc28j60_arch_spi_select();
|
enc28j60_arch_spi_select();
|
||||||
|
@ -477,7 +477,7 @@ reset(void)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
void
|
void
|
||||||
enc28j60_init(uint8_t *mac_addr)
|
enc28j60_init(const uint8_t *mac_addr)
|
||||||
{
|
{
|
||||||
if(initialized) {
|
if(initialized) {
|
||||||
return;
|
return;
|
||||||
|
@ -496,7 +496,7 @@ enc28j60_init(uint8_t *mac_addr)
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
int
|
int
|
||||||
enc28j60_send(uint8_t *data, uint16_t datalen)
|
enc28j60_send(const uint8_t *data, uint16_t datalen)
|
||||||
{
|
{
|
||||||
uint16_t dataend;
|
uint16_t dataend;
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,9 @@
|
||||||
#ifndef ENC28J60_H
|
#ifndef ENC28J60_H
|
||||||
#define 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);
|
int enc28j60_read(uint8_t *buffer, uint16_t bufsize);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue