From 7440843d3a1e108fdf78b8cfff073aa60a2a41f7 Mon Sep 17 00:00:00 2001 From: guanjiao ren <guanjiao.ren@ninebot.com> Date: 星期五, 18 五月 2018 15:22:35 +0800 Subject: [PATCH] spi与dw_driver重写 --- 源码/核心板/Src/OnChipDevices/Spi.c | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Spi.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Spi.c" index c2e4ab4..b918be1 100644 --- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Spi.c" +++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/OnChipDevices/Spi.c" @@ -1,4 +1,5 @@ #include "Spi.h" +#include "deca_device_api.h" void Spi_Init(void) { @@ -79,12 +80,12 @@ * Takes two separate byte buffers for write header and write data * returns 0 for success, or -1 for error */ -int writetospi_serial +int writetospi ( - uint16_t headerLength, - const uint8_t *headerBuffer, - uint32_t bodylength, - const uint8_t *bodyBuffer + uint16 headerLength, + const uint8 *headerBuffer, + uint32 bodylength, + const uint8 *bodyBuffer ) { @@ -130,12 +131,12 @@ * returns the offset into read buffer where first byte of read data may be found, * or returns -1 if there was an error */ -int readfromspi_serial +int readfromspi ( - uint16_t headerLength, - const uint8_t *headerBuffer, - uint32_t readlength, - uint8_t *readBuffer + uint16 headerLength, + const uint8 *headerBuffer, + uint32 readlength, + uint8 *readBuffer ) { -- Gitblit v1.9.3