OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [example/] [blink_led/] [main.c] - Diff between revs 61 and 62

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 61 Rev 62
Line 108... Line 108...
/**********************************************************************//**
/**********************************************************************//**
 * C-version of blinky LED counter
 * C-version of blinky LED counter
 **************************************************************************/
 **************************************************************************/
void blink_led_c(void) {
void blink_led_c(void) {
 
 
  neorv32_gpio_port_set(0); // clear gpio output put
  neorv32_gpio_port_set(0); // clear gpio output
 
 
  int cnt = 0;
  int cnt = 0;
 
 
  while (1) {
  while (1) {
    neorv32_gpio_port_set(cnt++ & 0xFF); // increment counter and mask for lowest 8 bit
    neorv32_gpio_port_set(cnt++ & 0xFF); // increment counter and mask for lowest 8 bit

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.