Add a "noreturn" attribute to 'scb_reset_system'
Adding this attribute allows to avoid warnings issued by GCC in cases when 'scb_reset_system' is used as a last call in a function with "noreturn" attribute set(usually reset handler of some sorts)
This commit is contained in:
committed by
Piotr Esden-Tempski
parent
e944876b63
commit
6cb7d8abf3
@@ -17,16 +17,22 @@
|
||||
* along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <libopencm3/cm3/scb.h>
|
||||
|
||||
void scb_reset_core(void)
|
||||
{
|
||||
SCB_AIRCR = SCB_AIRCR_VECTKEY | SCB_AIRCR_VECTRESET;
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void scb_reset_system(void)
|
||||
{
|
||||
SCB_AIRCR = SCB_AIRCR_VECTKEY | SCB_AIRCR_SYSRESETREQ;
|
||||
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void scb_set_priority_grouping(u32 prigroup)
|
||||
|
||||
Reference in New Issue
Block a user