-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStm32Hal.h
29 lines (20 loc) · 910 Bytes
/
Stm32Hal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
* This file is part of the Arducam SPI Camera project.
*
* Copyright 2021 Arducam Technology co., Ltd. All Rights Reserved.
*
* This work is licensed under the MIT license, see the file LICENSE for details.
*
*/
#ifndef __STM32HAL_H
#define __STM32HAL_H
#include "delay.h"
#include "spi.h"
#define arducamSpiBegin() spiBegin()
#define arducamSpiTransfer(val) spiReadWriteByte(val) // SPI communication sends a byte
#define arducamSpiCsPinHigh(pin) spiCsHigh(pin) //Set the CS pin of SPI to high level
#define arducamSpiCsPinLow(pin) spiCsLow(pin) //Set the CS pin of SPI to low level
#define arducamCsOutputMode(pin) spiCsOutputMode(pin)
#define arducamDelayMs(val) delayMs(val) // Delay Ms
#define arducamDelayUs(val) delayUs(val) //Delay Us
#endif /*__STM32HAL_H*/