python-schdoc/tests/altium_crap/Tutorials/32 bit FPGA Processor Design/Embedded/leds1.c

30 lines
342 B
C

#include <stdint.h>
#include "hardware.h"
volatile uint8_t * const leds = (void *)Base_GPIO;
void main( void )
{
*leds = 0; // Initialize the LEDs to all OFF
for ( ;; )
{
(*leds)++;
for ( int delay = 0; delay < 5000000; delay++ )
{
__nop(); // Two underscores
}
}
}