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

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [fpga/] [xilinx_diligent_s3board/] [software/] [leds/] [main.c] - Diff between revs 28 and 84

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

Rev 28 Rev 84
Line 3... Line 3...
 
 
/**
/**
Delay function.
Delay function.
*/
*/
void delay(unsigned int c, unsigned int d) {
void delay(unsigned int c, unsigned int d) {
  int i, j;
  volatile int i, j;
  for (i = 0; i<c; i++) {
  for (i = 0; i<c; i++) {
    for (j = 0; j<d; j++) {
    for (j = 0; j<d; j++) {
      nop();
      nop();
      nop();
      nop();
    }
    }
Line 17... Line 17...
/**
/**
This one is executed onece a second. it counts seconds, minues, hours - hey
This one is executed onece a second. it counts seconds, minues, hours - hey
it shoule be a clock ;-)
it shoule be a clock ;-)
it does not count days, but i think you'll get the idea.
it does not count days, but i think you'll get the idea.
*/
*/
int irq_counter, offset;
volatile int irq_counter, offset;
 
 
wakeup interrupt (WDT_VECTOR) INT_Watchdog(void) {
wakeup interrupt (WDT_VECTOR) INT_Watchdog(void) {
 
 
  irq_counter++;
  irq_counter++;
  if (irq_counter == 300) {
  if (irq_counter == 300) {

powered by: WebSVN 2.1.0

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