esp32,stm32: 添加 machine.I2S 支持 I2S 协议

MicroPython、microbit、makecode等
最新动态
回复
头像
shaoziyang
帖子: 3917
注册时间: 2019年 10月 21日 13:48

esp32,stm32: 添加 machine.I2S 支持 I2S 协议

#1

帖子 shaoziyang »

在最近的更新中,micropython添加了对I2S的支持
Add new machine.I2S class for I2S protocol support.This commit adds I2S protocol support for the esp32 and stm32 ports, via a new machine.I2S class. It builds on the stm32 work of blmorris, #1361.

Features include:
  • a consistent I2S API across the esp32 and stm32 ports
  • I2S configurations supported:
    • master transmit and master receive
    • 16-bit and 32-bit sample sizes
    • mono and stereo formats
    • sampling frequency
    • 3 modes of operation:
      • blocking
      • non-blocking with callback
      • uasyncio
    • internal ring buffer size can be tuned
  • documentation for Pyboards and esp32-based boards
  • tested on the following development boards:
    • Pyboard D SF2W
    • Pyboard V1.1
    • ESP32 with SPIRAM
    • ESP32
主要功能:
  • 在ESP32和STM32之间一致的 I2S API
  • I2S支持的配置:
    • 主机发送和接收
    • 16位和32位采样
    • 单声道和立体声格式
    • 采样频率
    • 3种操作模式:
      • 阻塞
      • 带回调的非阻塞
      • 异步
    • 内部环形缓冲区大小可以调整
  • Pyboard和基于esp32的板的文档
  • 在以下开发板上已测试:
    • Pyboard D SF2W
    • Pyboard V1.1
    • ESP32 with SPIRAM
    • ESP32

回复

  • 随机主题
    回复总数
    阅读次数
    最新文章