Skip to content

Commit

Permalink
Merge pull request #7857 from kYc0o/fix_enc28j60_comp
Browse files Browse the repository at this point in the history
drivers/enc28j60/enc28j60.c: fix counter var length
  • Loading branch information
kYc0o committed Nov 7, 2017
2 parents 2c19595 + 58e3fab commit a423897
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/enc28j60/enc28j60.c
Expand Up @@ -43,7 +43,7 @@
* @brief If the clock is not stable after these amount of tries we abort the
* initialization
*/
#define STARTUP_TIMEOUT (1000U)
#define STARTUP_TIMEOUT (1000)

/**
* @brief Set SPI speed fixed to 10MHz
Expand Down Expand Up @@ -256,7 +256,7 @@ static int nd_send(netdev_t *netdev, const struct iovec *data, unsigned count)
cmd_w_addr(dev, ADDR_WRITE_PTR, BUF_TX_START);
/* write control byte and the actual data into the buffer */
cmd_wbm(dev, &ctrl, 1);
for (int i = 0; i < count; i++) {
for (unsigned i = 0; i < count; i++) {
c += data[i].iov_len;
cmd_wbm(dev, (uint8_t *)data[i].iov_base, data[i].iov_len);
}
Expand Down Expand Up @@ -320,7 +320,8 @@ static int nd_init(netdev_t *netdev)
/* setup the low-level interfaces */
gpio_init(dev->reset_pin, GPIO_OUT);
gpio_clear(dev->reset_pin); /* this puts the device into reset state */
if (spi_init_cs(dev->spi, dev->cs_pin) != SPI_OK) {
res = spi_init_cs(dev->spi, dev->cs_pin);
if (res != SPI_OK) {
DEBUG("[enc28j60] init: error initializing the CS pin [%i]\n", res);
return -1;
}
Expand Down

0 comments on commit a423897

Please sign in to comment.