diff --git a/src/board/system76/common/include/board/parallel.h b/src/board/system76/common/include/board/parallel.h index 530def7..3b65d1b 100644 --- a/src/board/system76/common/include/board/parallel.h +++ b/src/board/system76/common/include/board/parallel.h @@ -8,6 +8,6 @@ extern bool parallel_debug; bool parallel_init(void); -int16_t parallel_write(uint8_t * data, int16_t length); +int16_t parallel_write(uint8_t * data, uint16_t length); #endif // _BOARD_PARALLEL_H diff --git a/src/board/system76/common/parallel.c b/src/board/system76/common/parallel.c index fd460a3..435bb36 100644 --- a/src/board/system76/common/parallel.c +++ b/src/board/system76/common/parallel.c @@ -82,14 +82,14 @@ bool parallel_init(void) { return parallel_wait_peripheral(STS_WAIT, 0); } -int16_t parallel_write(uint8_t * data, int16_t length) { +int16_t parallel_write(uint8_t * data, uint16_t length) { // Assert nWRITE KSIGDAT &= ~CTL_WRITE; // Set data lines as outputs KSOLGOEN = 0xFF; - int16_t i; + uint16_t i; for (i = 0; i < length; i++) { // Wait for peripheral to indicate it's ready for next cycle if (!parallel_wait_peripheral(STS_WAIT, 0)) {