- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
hello
I am working on niosII 13.0 web edition trying to command 2 LEDs using 2 Switchers on Cyclone III board the niosII console shows that the elf is downloaded BUT when i click on Sw nothing happens !! what could be the problem ?! Downloading 00004000 ( 0%)Downloading 00004F0C (61%)Downloaded 4KB in 0.0s Verifying 00004000 ( 0%)Verifying 00004F0C (61%)Verified OK Starting processor at address 0x00004020- Balises:
- Include
Lien copié
1 Répondre
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
#include "io.h"
# include "system.h" /** * Gets led_pattern as parameter in order to write to the register. */ void set_led(unsigned char led_pattern) { IOWR(LED_BASE, 0, led_pattern); // writes register } /** * Main, what else? * Gets LEDs pattern from switchers. * Sets LEDs register according to the pattern. **/ void main() { unsigned char led_pattern = 0x00; while (1) { // infinite loop led_pattern = IORD(SWITCHER_BASE, 0); // gets LEDs set_led(led_pattern); // sets LEDs } }
Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable