URL
https://opencores.org/ocsvn/amber/amber/trunk
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 61 |
Rev 80 |
Line 115... |
Line 115... |
{
|
{
|
*(unsigned int *) ADR_AMBER_TEST_PHY_RST = value;
|
*(unsigned int *) ADR_AMBER_TEST_PHY_RST = value;
|
}
|
}
|
|
|
|
|
/* turn off all leds */
|
|
void led_clear()
|
|
{
|
|
*(unsigned int *) ADR_AMBER_TEST_LED = 0;
|
|
}
|
|
|
|
|
|
/* led is either 0,1,2 or 3 */
|
|
void led_flip(int led)
|
|
{
|
|
int current_value;
|
|
current_value = *(unsigned int *) ADR_AMBER_TEST_LED;
|
|
*(unsigned int *) ADR_AMBER_TEST_LED = current_value ^ (1<<led);
|
|
}
|
|
|
|
|
|
|
|
/* led is either 0,1,2 or 3 */
|
|
void led_on(int led)
|
|
{
|
|
int current_value;
|
|
current_value = *(unsigned int *) ADR_AMBER_TEST_LED;
|
|
*(unsigned int *) ADR_AMBER_TEST_LED = current_value | (1<<led);
|
|
}
|
|
|
|
|
|
|
|
/* led is either 0,1,2 or 3 */
|
|
void led_off(int led)
|
|
{
|
|
int current_value;
|
|
current_value = *(unsigned int *) ADR_AMBER_TEST_LED;
|
|
*(unsigned int *) ADR_AMBER_TEST_LED = current_value & ~(1<<led);
|
|
}
|
|
|
|
|
|
/* led is either 0,1,2 or 3 */
|
|
void led_123(int value)
|
|
{
|
|
int current_value;
|
|
current_value = *(unsigned int *) ADR_AMBER_TEST_LED;
|
|
*(unsigned int *) ADR_AMBER_TEST_LED = (current_value & 1) | value<<1;
|
|
}
|
|
|
|
No newline at end of file
|
No newline at end of file
|
© copyright 1999-2025
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.