mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
19276: pkg/tinyusb: bump to 0.15 r=benpicco a=benpicco 19279: cpu/stm32/periph/i2c: export PERIPH_I2C_MAX_BYTES_PER_FRAME r=benpicco a=fabian18 Co-authored-by: Benjamin Valentin <benjamin.valentin@bht-berlin.de> Co-authored-by: Fabian Hüßler <fabian.huessler@st.ovgu.de>
This commit is contained in:
commit
1472a76adf
@ -161,6 +161,19 @@ static const i2c_timing_param_t timing_params[] = {
|
||||
CPU_FAM_STM32G0 || CPU_FAM_STM32G4 || CPU_FAM_STM32U5 ||
|
||||
CPU_FAM_STM32WB || CPU_FAM_STM32WL */
|
||||
|
||||
#if defined(CPU_FAM_STM32F0) || defined(CPU_FAM_STM32F3) || \
|
||||
defined(CPU_FAM_STM32F7) || defined(CPU_FAM_STM32G0) || \
|
||||
defined(CPU_FAM_STM32G4) || defined(CPU_FAM_STM32L0) || \
|
||||
defined(CPU_FAM_STM32L4) || defined(CPU_FAM_STM32L5) || \
|
||||
defined(CPU_FAM_STM32U5) || defined(CPU_FAM_STM32WB) || \
|
||||
defined(CPU_FAM_STM32WL)
|
||||
/**
|
||||
* @brief The I2C implementation supports only a limited frame size.
|
||||
* See i2c_1.c
|
||||
*/
|
||||
#define PERIPH_I2C_MAX_BYTES_PER_FRAME (256U)
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -51,7 +51,6 @@
|
||||
#include "debug.h"
|
||||
|
||||
#define TICK_TIMEOUT (0xFFFF)
|
||||
#define MAX_BYTES_PER_FRAME (256)
|
||||
|
||||
#define I2C_IRQ_PRIO (1)
|
||||
#define I2C_FLAG_READ (I2C_READ << I2C_CR2_RD_WRN_Pos)
|
||||
@ -217,7 +216,7 @@ int i2c_write_regs(i2c_t dev, uint16_t addr, uint16_t reg,
|
||||
int i2c_read_bytes(i2c_t dev, uint16_t address, void *data,
|
||||
size_t length, uint8_t flags)
|
||||
{
|
||||
assert(dev < I2C_NUMOF && length < MAX_BYTES_PER_FRAME);
|
||||
assert(dev < I2C_NUMOF && length < PERIPH_I2C_MAX_BYTES_PER_FRAME);
|
||||
|
||||
I2C_TypeDef *i2c = i2c_config[dev].dev;
|
||||
assert(i2c != NULL);
|
||||
@ -275,7 +274,7 @@ int i2c_write_bytes(i2c_t dev, uint16_t address, const void *data,
|
||||
static int _write(I2C_TypeDef *i2c, uint16_t addr, const void *data,
|
||||
size_t length, uint8_t flags, uint32_t cr2_flags)
|
||||
{
|
||||
assert(i2c != NULL && length < MAX_BYTES_PER_FRAME);
|
||||
assert(i2c != NULL && length < PERIPH_I2C_MAX_BYTES_PER_FRAME);
|
||||
|
||||
/* If reload was NOT set, must either stop or start */
|
||||
if ((i2c->ISR & I2C_ISR_TC) && (flags & I2C_NOSTART)) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
PKG_NAME=tinyusb
|
||||
PKG_URL=https://github.com/hathach/tinyusb
|
||||
# TinyUSB 0.14.0
|
||||
PKG_VERSION=9e91b02ec7fb3502747b5c413a4824654fa7fc7e
|
||||
# TinyUSB 0.15.0
|
||||
PKG_VERSION=86c416d4c0fb38432460b3e11b08b9de76941bf5
|
||||
|
||||
PKG_LICENSE=MIT
|
||||
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user