Skip to content

Commit

Permalink
Clean up logs
Browse files Browse the repository at this point in the history
  • Loading branch information
lupyuen committed Feb 12, 2024
1 parent 2845379 commit 9a0beac
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions arch/risc-v/src/bl808/bl808_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ int bl808_configgpio(int pin, gpio_pinattr_t attr)
}

regaddr = BL808_GPIO_BASE + (pin * 4);
_info("regaddr=%p, cfg=0x%x\n", regaddr, cfg);////
// _info("regaddr=%p, cfg=0x%x\n", regaddr, cfg);////
putreg32(cfg, regaddr);
return OK;
}
Expand All @@ -117,12 +117,12 @@ void bl808_gpiowrite(int pin, bool value)
regaddr = BL808_GPIO_BASE + (pin * 4);
if (value)
{
_info("regaddr=%p, set=0x%x\n", regaddr, (1 << reg_gpio_xx_o));////
up_putc('\n'); _info("regaddr=%p, set=0x%x\n", regaddr, (1 << reg_gpio_xx_o));////
modifyreg32(regaddr, 0, (1 << reg_gpio_xx_o));
}
else
{
_info("regaddr=%p, clear=0x%x\n", regaddr, (1 << reg_gpio_xx_o));////
up_putc('\n'); _info("regaddr=%p, clear=0x%x\n", regaddr, (1 << reg_gpio_xx_o));////
modifyreg32(regaddr, (1 << reg_gpio_xx_o), 0);
}
}
Expand Down
6 changes: 3 additions & 3 deletions boards/risc-v/bl808/ox64/src/bl808_appinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,14 @@ void board_late_initialize(void)
#define GPIO_PIN 29
#define GPIO_ATTR (GPIO_OUTPUT | GPIO_FUNC_SWGPIO)

_info("Config GPIO: pin=%d, attr=0x%x\n", GPIO_PIN, GPIO_ATTR);
// _info("Config GPIO: pin=%d, attr=0x%x\n", GPIO_PIN, GPIO_ATTR);
int ret2 = bl808_configgpio(GPIO_PIN, GPIO_ATTR);
DEBUGASSERT(ret2 == OK);

_info("Set GPIO: pin=%d\n", GPIO_PIN);
// _info("Set GPIO: pin=%d\n", GPIO_PIN);
bl808_gpiowrite(GPIO_PIN, true);
up_mdelay(1000);

_info("Clear GPIO: pin=%d\n", GPIO_PIN);
// _info("Clear GPIO: pin=%d\n", GPIO_PIN);
bl808_gpiowrite(GPIO_PIN, false);
}
6 changes: 3 additions & 3 deletions boards/risc-v/bl808/ox64/src/bl808_userleds.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ uint32_t board_userled_initialize(void)

void board_userled(int led, bool ledon)
{
_info("led=%d, ledon=%d\n", led, ledon);////
// _info("led=%d, ledon=%d\n", led, ledon);////
if ((unsigned)led < BOARD_LEDS)
{
////TODO: gpio_write(g_led_map[led], ledon);
Expand Down Expand Up @@ -181,15 +181,15 @@ void board_userled(int led, bool ledon)

void board_userled_all(uint32_t ledset)
{
_info("ledset=0x%x\n", ledset);////
// _info("ledset=0x%x\n", ledset);////
int i;

// For LED 0 to 2...
for (i = 0; i < BOARD_LEDS; i++)
{
// Get the desired state of the LED
bool val = ((ledset & g_led_setmap[i]) != 0);
_info("led=%d, val=%d\n", i, val);////
// _info("led=%d, val=%d\n", i, val);////

// If this is LED 0...
if (i == 0)
Expand Down

0 comments on commit 9a0beac

Please sign in to comment.