Open ColinYip100 opened 4 years ago
Thanks for your feedback!
Usually, I use this function return to know if it's a POR or WDG, so I wasn't able to test every case.
Your solution takes the opposite thinking but doesn't solve the issue I guess. My implementation always returns the 1st reset source encountered, and yours, last one encountered. I think keeping 'else if's might be a better solution if reset sources can be sorted in a better way...
My question, when you say multiple sources can be set at once, do you have an example? and the one that is more relevant to you?
Thanks in advance!
sometimes __HAL_RCC_GET_FLAG return more than 1flag,take away else would be a better result.
eResetSource Get_Reset_Source(void) { eResetSource rst = RST_UNKNOWN;
}