syntax sugar

This commit is contained in:
iceman1001 2017-09-20 10:42:03 +02:00
commit 1c3ffe1ce2

View file

@ -22,8 +22,7 @@ struct common_area common_area __attribute__((section(".commonarea")));
unsigned int start_addr, end_addr, bootrom_unlocked; unsigned int start_addr, end_addr, bootrom_unlocked;
extern char _bootrom_start, _bootrom_end, _flash_start, _flash_end; extern char _bootrom_start, _bootrom_end, _flash_start, _flash_end;
static void ConfigClocks(void) static void ConfigClocks(void) {
{
// we are using a 16 MHz crystal as the basis for everything // we are using a 16 MHz crystal as the basis for everything
// slow clock runs at 32Khz typical regardless of crystal // slow clock runs at 32Khz typical regardless of crystal
@ -186,8 +185,7 @@ void UsbPacketReceived(uint8_t *packet, int len) {
cmd_send(CMD_ACK,arg0,0,0,0,0); cmd_send(CMD_ACK,arg0,0,0,0,0);
} }
static void flash_mode(int externally_entered) static void flash_mode(int externally_entered) {
{
start_addr = 0; start_addr = 0;
end_addr = 0; end_addr = 0;
bootrom_unlocked = 0; bootrom_unlocked = 0;
@ -211,8 +209,7 @@ static void flash_mode(int externally_entered)
usb_disable(); usb_disable();
LED_B_ON(); LED_B_ON();
AT91C_BASE_RSTC->RSTC_RCR = RST_CONTROL_KEY | AT91C_RSTC_PROCRST; AT91C_BASE_RSTC->RSTC_RCR = RST_CONTROL_KEY | AT91C_RSTC_PROCRST;
for(;;) for(;;) {};
;
} }
if (externally_entered && BUTTON_PRESS()) { if (externally_entered && BUTTON_PRESS()) {
/* Let the user's button press override the automatic leave */ /* Let the user's button press override the automatic leave */
@ -222,8 +219,7 @@ static void flash_mode(int externally_entered)
} }
extern uint32_t _osimage_entry; extern uint32_t _osimage_entry;
void BootROM(void) void BootROM(void) {
{
//------------ //------------
// First set up all the I/O pins; GPIOs configured directly, other ones // First set up all the I/O pins; GPIOs configured directly, other ones
// just need to be assigned to the appropriate peripheral. // just need to be assigned to the appropriate peripheral.