Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: test-lpc1768 oldheating gps motorhome ... more
reset/rsid.c
- Committer:
- andrewboyson
- Date:
- 2019-05-08
- Revision:
- 49:d056e2c5c4ee
File content as of revision 49:d056e2c5c4ee:
#include <stdbool.h>
#define RSID (*((volatile unsigned *) 0x400FC180))
bool RsidPor = false;
bool RsidExtr = false;
bool RsidWdtr = false;
bool RsidBodr = false;
void RsidInit()
{
RsidPor = RSID & 1; //RSID is defined in 3.4.1 Reset Source Identification Register
RsidExtr = RSID & 2;
RsidWdtr = RSID & 4;
RsidBodr = RSID & 8;
RSID = 0xF; //Clear any values
}