ATY_LIB V2_102_230218
ATY_LIB for general devices or ALGO
 
Loading...
Searching...
No Matches
fw_spi.c
Go to the documentation of this file.
1// Copyright 2021 IOsetting <iosetting(at)outlook.com>
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#include "fw_spi.h"
16#include "fw_tim.h"
17#include "fw_sys.h"
18
19
21{
22 SPDAT = dat;
23 while (!SPI_RxTxFinished());
25 return SPDAT;
26}
27
29{
30 while(len--)
31 {
32 *pBuf++ = SPI_TxRx(*pBuf);
33 }
34}
__CODE int8_t dat[20]
uint8_t SPI_TxRx(uint8_t dat)
Definition: fw_spi.c:20
void SPI_TxRxBytes(uint8_t *pBuf, uint8_t len)
Definition: fw_spi.c:28
#define SPI_ClearInterrupts()
Definition: fw_spi.h:66
#define SPI_RxTxFinished()
Definition: fw_spi.h:63
unsigned char uint8_t
Definition: fw_types.h:18