KETCube
Drivers
KETCube
modules
ketCube_i2s.h
Go to the documentation of this file.
1
45
#ifndef __KETCUBE_I2S_H
46
#define __KETCUBE_I2S_H
47
48
#include "stm32l0xx_hal.h"
49
#include "stm32l0xx_hal_i2s.h"
50
51
#include "
ketCube_cfg.h
"
52
64
#define KETCUBE_I2S_NAME "i2s_drv"
65
#define KETCUBE_I2S_HANDLE SPI2
66
67
#define KETCUBE_I2S_SAMPLE_RATE I2S_AUDIOFREQ_32K
68
69
70
#define KETCUBE_I2S_CLK_ENABLE() __SPI2_CLK_ENABLE()
71
#define KETCUBE_I2S_FORCE_RESET() __SPI2_FORCE_RESET()
72
#define KETCUBE_I2S_RELEASE_RESET() __SPI2_RELEASE_RESET()
73
#define KETCUBE_I2S_WS_CK_SD_GPIO_CLK_ENABLE() __GPIOB_CLK_ENABLE()
74
#define KETCUBE_I2S_WS_CK_SD_AF GPIO_AF0_SPI2
75
#define KETCUBE_I2S_WS_CK_SD_GPIO_PORT GPIOB
76
#define KETCUBE_I2S_WS_PIN GPIO_PIN_12
77
#define KETCUBE_I2S_CK_PIN GPIO_PIN_13
78
#define KETCUBE_I2S_SD_PIN GPIO_PIN_15
79
#define KETCUBE_I2S_EV_IRQn SPI2_IRQn
80
90
ketCube_cfg_ModError_t
ketCube_I2S_Init
(
void
);
91
ketCube_cfg_ModError_t
ketCube_I2S_UnInit
(
void
);
92
101
#endif
/* __KETCUBE_I2S_H */
ketCube_I2S_Init
ketCube_cfg_ModError_t ketCube_I2S_Init(void)
ketCube_I2S_UnInit
ketCube_cfg_ModError_t ketCube_I2S_UnInit(void)
ketCube_cfg.h
This file contains definitions for the KETCube configuration.
ketCube_cfg_ModError_t
ketCube_cfg_ModError_t
Error code type.
Definition:
ketCube_cfg.h:100
Generated by
1.8.20