Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    R128-S2 test_spi.c 文件问题修复: 修复2/4线 无法正常输出数据位

    MR Series
    2
    2
    1043
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      maplerian LV 3 last edited by

      在文件 函数 transfer 中, 变量 tr.tx_single_len 值, 是在1/2/4线模式下, 有多少个tx_buf数据是需要单线输出的.
      因此, 在选择2/4线模式下, tx_single_len 值默认为数据长度 len, 因此, 才会导致D1-D3无法正常输出数据位
      正确做法应该是
      if (tr.tx_nbits > SPI_NBITS_SINGLE)
      tr.tx_single_len = 0;

      J 1 Reply Last reply Reply Quote Share 1
      • J
        Jingyan LV 5 @maplerian last edited by

        @maplerian 是的没错,感谢提醒

        1 Reply Last reply Reply Quote Share 0
        • Moved from A Series by  xiaowenge xiaowenge 
        • 1 / 1
        • First post
          Last post

        Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

        行为准则 | 用户协议 | 隐私权政策