This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] CC1312R:SPICC26X2DMA.c中线路258处的奇怪开关盒脱落

Guru**** 2589280 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/wireless-connectivity/sub-1-ghz-group/sub-1-ghz/f/sub-1-ghz-forum/1102764/cc1312r-strange-switch-case-fall-through-at-line-258-in-spicc26x2dma-c

部件号:CC1312R

您好,

我在simplelink_cc13xx/source/ti/drivers/SPI/SPICC26X2DMA.c中的第258行看到了一个掉线

(Simplelink 6.10 .0.29)

        case SPICC26X2DMA_CMD_SET_CSN_PIN:
            pinIndex = *((uint_least8_t*) arg);

            if (pinIndex == GPIO_INVALID_INDEX) {
                /* If trying to disable the CS pin, forward to the CLEAR_CSN command and break */
                ret = SPICC26X2DMA_control(handle, SPICC26X2DMA_CMD_CLEAR_CSN_PIN, NULL);
                break;
            }

            /* Reset the previous CS pin and configure the new one */
            GPIO_resetConfig(object->csnPin);
            object->csnPin = pinIndex;
            GPIO_setMux(object->csnPin, hwAttrs->csnPinMux);

            ret = SPI_STATUS_SUCCESS;

        case SPICC26X2DMA_CMD_CLEAR_CSN_PIN:
            /* If the CS pin is assigned, reset and unassign it */
            if (object->csnPin != GPIO_INVALID_INDEX) {
                GPIO_resetConfig(object->csnPin);
                object->csnPin = GPIO_INVALID_INDEX;
            }
            ret = SPI_STATUS_SUCCESS;
            break;

它看起来很奇怪,它真的是有意的吗?

巴西

Tomas Olsson

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好,Tomas:

    故障不是故意的,而是一个错误。 已将此问题报告给研发部门,并将在将来的SDK版本中予以修复。

    感谢您报告此问题。

    此致,
    Nikolaj