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.

[参考译文] MSP430FR5.9721万:与密码相关

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

https://e2e.ti.com/support/microcontrollers/msp-low-power-microcontrollers-group/msp430/f/msp-low-power-microcontroller-forum/584700/msp430fr59721-related-to-password

部件号:MSP430FR5.9721万.

你(们)好

实际上,我有一个API,比如说“abc()”,它将在主()程序中使用多个时间。

但是,如果第一次调用API,则需要输入密码,但仅限于第一次。

那么,谁能提供这方面的示例代码呢?   

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    bool passwordEntered = false;
    
    void abc()
    {
    如果(!passwordEntered){
    如果(enterPassword())
    passwordEntered =真;
    否则
    return;//错误处理
    }
    
    //...
    }