Skip to content

Commit

Permalink
add ptr space
Browse files Browse the repository at this point in the history
  • Loading branch information
anydream committed Sep 8, 2015
1 parent b3c0a16 commit 0ebc510
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions TurboSPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TurboSPI
*
* \return Zero for no error or nonzero error code.
*/
uint8_t Receive(uint8_t* buf, size_t n);
uint8_t Receive(uint8_t * buf, size_t n);
/** Send a byte.
*
* \param[in] data Byte to send
Expand All @@ -37,7 +37,7 @@ class TurboSPI
* \param[in] buf Buffer for data to be sent.
* \param[in] n Number of bytes to send.
*/
void Send(const uint8_t* buf, size_t n);
void Send(const uint8_t * buf, size_t n);
};

class DigitalPin
Expand Down
4 changes: 2 additions & 2 deletions TurboSPI_AVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ uint8_t TurboSPI::Receive()
return SPDR;
}
//------------------------------------------------------------------------------
uint8_t TurboSPI::Receive(uint8_t* buf, size_t n)
uint8_t TurboSPI::Receive(uint8_t * buf, size_t n)
{
if (n-- == 0)
{
Expand Down Expand Up @@ -72,7 +72,7 @@ void TurboSPI::Send(uint8_t data)
;
}
//------------------------------------------------------------------------------
void TurboSPI::Send(const uint8_t* buf, size_t n)
void TurboSPI::Send(const uint8_t * buf, size_t n)
{
if (n == 0)
{
Expand Down
8 changes: 4 additions & 4 deletions TurboSPI_SAM3X.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static bool DMAC_ChannelTransferDone(uint32_t ul_num)

//------------------------------------------------------------------------------
// start RX DMA
static void SPI_DMA_Receive(uint8_t* dst, uint16_t count)
static void SPI_DMA_Receive(uint8_t * dst, uint16_t count)
{
DMAC_ChannelDisable(SPI_DMAC_RX_CH);
DMAC->DMAC_CH_NUM[SPI_DMAC_RX_CH].DMAC_SADDR = (uint32_t)&SPI0->SPI_RDR;
Expand All @@ -65,7 +65,7 @@ static void SPI_DMA_Receive(uint8_t* dst, uint16_t count)
}
//------------------------------------------------------------------------------
// start TX DMA
static void SPI_DMA_Transfer(const uint8_t* src, uint16_t count)
static void SPI_DMA_Transfer(const uint8_t * src, uint16_t count)
{
static uint8_t ff = 0XFF;
uint32_t src_incr = DMAC_CTRLB_SRC_INCR_INCREMENTING;
Expand Down Expand Up @@ -165,7 +165,7 @@ uint8_t TurboSPI::Receive()

//------------------------------------------------------------------------------
/** SPI receive multiple bytes */
uint8_t TurboSPI::Receive(uint8_t* buf, size_t n)
uint8_t TurboSPI::Receive(uint8_t * buf, size_t n)
{
Spi* pSpi = SPI0;
int rtn = 0;
Expand Down Expand Up @@ -211,7 +211,7 @@ void TurboSPI::Send(uint8_t b)
}

//------------------------------------------------------------------------------
void TurboSPI::Send(const uint8_t* buf, size_t n)
void TurboSPI::Send(const uint8_t * buf, size_t n)
{
Spi* pSpi = SPI0;
#if USE_SAM3X_DMAC
Expand Down

0 comments on commit 0ebc510

Please sign in to comment.