Fix some spacing problems

This commit is contained in:
Gregory Nutt
2015-10-04 14:59:44 -06:00
parent 2b88bc7119
commit b6930e442b
27 changed files with 141 additions and 141 deletions
+62 -62
View File
@@ -75,49 +75,49 @@ void tm4c_ledinit(void)
void board_led_on(int led) void board_led_on(int led)
{ {
/* --------------- ------- ---- ----- -------------------- /* --------------- ------- ---- ----- --------------------
* STATE VALUE RED GREEN BLUE * STATE VALUE RED GREEN BLUE
* --------------- ------- ---- ----- -------------------- * --------------- ------- ---- ----- --------------------
* LED_STARTED 0 OFF OFF ON * LED_STARTED 0 OFF OFF ON
* LED_HEAPALLOCATE 1 NC NC NC * LED_HEAPALLOCATE 1 NC NC NC
* LED_IRQSENABLED 1 NC NC NC * LED_IRQSENABLED 1 NC NC NC
* LED_STACKCREATED 2 OFF ON OFF * LED_STACKCREATED 2 OFF ON OFF
* LED_INIRQ 1 NC NC NC * LED_INIRQ 1 NC NC NC
* LED_SIGNAL 1 NC NC NC * LED_SIGNAL 1 NC NC NC
* LED_ASSERTION 1 NC NC NC * LED_ASSERTION 1 NC NC NC
* LED_PANIC 3 ON OFF OFF (flashing 2Hz) * LED_PANIC 3 ON OFF OFF (flashing 2Hz)
* --------------- ------- ---- ----- -------------------- * --------------- ------- ---- ----- --------------------
* *
* A high output illuminates the LED. * A high output illuminates the LED.
*/ */
switch (led) switch (led)
{ {
case 0: /* R=OFF, G=OFF, B=ON */ case 0: /* R=OFF, G=OFF, B=ON */
/* Previous state was all OFF */ /* Previous state was all OFF */
tiva_gpiowrite(GPIO_LED_B, true); tiva_gpiowrite(GPIO_LED_B, true);
break; break;
default: default:
case 1: /* No change */ case 1: /* No change */
break; break;
case 2: /* R=OFF, G=ON, B=OFF */ case 2: /* R=OFF, G=ON, B=OFF */
/* Previous state was all: R=OFF, G=OFF, B=ON */ /* Previous state was all: R=OFF, G=OFF, B=ON */
tiva_gpiowrite(GPIO_LED_G, true); tiva_gpiowrite(GPIO_LED_G, true);
tiva_gpiowrite(GPIO_LED_B, false); tiva_gpiowrite(GPIO_LED_B, false);
break; break;
case 3: /* R=ON, G=OFF, B=OFF */ case 3: /* R=ON, G=OFF, B=OFF */
/* Previous state was all: R=OFF, G=Unknown, B=Unknown */ /* Previous state was all: R=OFF, G=Unknown, B=Unknown */
tiva_gpiowrite(GPIO_LED_R, true); tiva_gpiowrite(GPIO_LED_R, true);
tiva_gpiowrite(GPIO_LED_G, false); tiva_gpiowrite(GPIO_LED_G, false);
tiva_gpiowrite(GPIO_LED_B, false); tiva_gpiowrite(GPIO_LED_B, false);
break; break;
} }
} }
/**************************************************************************** /****************************************************************************
@@ -126,35 +126,35 @@ void board_led_on(int led)
void board_led_off(int led) void board_led_off(int led)
{ {
/* --------------- ------- ---- ----- -------------------- /* --------------- ------- ---- ----- --------------------
* STATE VALUE RED GREEN BLUE * STATE VALUE RED GREEN BLUE
* --------------- ------- ---- ----- -------------------- * --------------- ------- ---- ----- --------------------
* LED_STARTED 0 OFF OFF ON * LED_STARTED 0 OFF OFF ON
* LED_HEAPALLOCATE 1 NC NC NC * LED_HEAPALLOCATE 1 NC NC NC
* LED_IRQSENABLED 1 NC NC NC * LED_IRQSENABLED 1 NC NC NC
* LED_STACKCREATED 2 OFF ON OFF * LED_STACKCREATED 2 OFF ON OFF
* LED_INIRQ 1 NC NC NC * LED_INIRQ 1 NC NC NC
* LED_SIGNAL 1 NC NC NC * LED_SIGNAL 1 NC NC NC
* LED_ASSERTION 1 NC NC NC * LED_ASSERTION 1 NC NC NC
* LED_PANIC 3 ON OFF OFF (flashing 2Hz) * LED_PANIC 3 ON OFF OFF (flashing 2Hz)
* --------------- ------- ---- ----- -------------------- * --------------- ------- ---- ----- --------------------
* *
* A high output illuminates the LED. * A high output illuminates the LED.
*/ */
switch (led) switch (led)
{ {
case 0: /* Will not happen */ case 0: /* Will not happen */
case 1: /* No change */ case 1: /* No change */
case 2: /* Will not happen */ case 2: /* Will not happen */
default: default:
break; break;
case 3: /* R=OFF, G=OFF, B=OFF */ case 3: /* R=OFF, G=OFF, B=OFF */
/* Previous state was all: R=ON, G=OFF, B=OFF */ /* Previous state was all: R=ON, G=OFF, B=OFF */
tiva_gpiowrite(GPIO_LED_R, false); tiva_gpiowrite(GPIO_LED_R, false);
} }
} }
#endif /* CONFIG_ARCH_LEDS */ #endif /* CONFIG_ARCH_LEDS */
+2 -2
View File
@@ -296,8 +296,8 @@ static inline void lpc31_initsrc(void)
/* Are we already initialized? */ /* Are we already initialized? */
if (!g_pgsrc.initialized) if (!g_pgsrc.initialized)
{ {
/* No... the initialize now */ /* No... the initialize now */
pgllvdbg("Initializing\n"); pgllvdbg("Initializing\n");
+2 -2
View File
@@ -296,8 +296,8 @@ static inline void lpc31_initsrc(void)
/* Are we already initialized? */ /* Are we already initialized? */
if (!g_pgsrc.initialized) if (!g_pgsrc.initialized)
{ {
/* No... the initialize now */ /* No... the initialize now */
pgllvdbg("Initializing\n"); pgllvdbg("Initializing\n");
+1 -1
View File
@@ -302,7 +302,7 @@ void board_led_off(int led)
* Name: up_timerhook * Name: up_timerhook
****************************************************************************/ ****************************************************************************/
void up_timerhook(void) void up_timerhook(void)
{ {
if (g_cathoderow > 6) if (g_cathoderow > 6)
{ {
+1 -1
View File
@@ -120,7 +120,7 @@ struct led_setting_s
}; };
#endif #endif
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/
/* If CONFIG_ARCH_LEDS is defined then NuttX will control the LEDs. The /* If CONFIG_ARCH_LEDS is defined then NuttX will control the LEDs. The
+20 -20
View File
@@ -110,16 +110,16 @@ void atmega_ledinit(void)
void board_led_on(int led) void board_led_on(int led)
{ {
/* ON OFF /* ON OFF
* LED_STARTED 0 OFF ON (never happens) * LED_STARTED 0 OFF ON (never happens)
* LED_HEAPALLOCATE 0 OFF ON (never happens) * LED_HEAPALLOCATE 0 OFF ON (never happens)
* LED_IRQSENABLED 0 OFF ON (never happens) * LED_IRQSENABLED 0 OFF ON (never happens)
* LED_STACKCREATED 1 ON ON (never happens) * LED_STACKCREATED 1 ON ON (never happens)
* LED_INIRQ 2 OFF NC (momentary) * LED_INIRQ 2 OFF NC (momentary)
* LED_SIGNAL 2 OFF NC (momentary) * LED_SIGNAL 2 OFF NC (momentary)
* LED_ASSERTION 2 OFF NC (momentary) * LED_ASSERTION 2 OFF NC (momentary)
* LED_PANIC 0 OFF ON (1Hz flashing) * LED_PANIC 0 OFF ON (1Hz flashing)
*/ */
switch (led) switch (led)
{ {
@@ -152,16 +152,16 @@ void board_led_on(int led)
void board_led_off(int led) void board_led_off(int led)
{ {
/* ON OFF /* ON OFF
* LED_STARTED 0 OFF ON (never happens) * LED_STARTED 0 OFF ON (never happens)
* LED_HEAPALLOCATE 0 OFF ON (never happens) * LED_HEAPALLOCATE 0 OFF ON (never happens)
* LED_IRQSENABLED 0 OFF ON (never happens) * LED_IRQSENABLED 0 OFF ON (never happens)
* LED_STACKCREATED 1 ON ON (never happens) * LED_STACKCREATED 1 ON ON (never happens)
* LED_INIRQ 2 OFF NC (momentary) * LED_INIRQ 2 OFF NC (momentary)
* LED_SIGNAL 2 OFF NC (momentary) * LED_SIGNAL 2 OFF NC (momentary)
* LED_ASSERTION 2 OFF NC (momentary) * LED_ASSERTION 2 OFF NC (momentary)
* LED_PANIC 0 OFF ON (1Hz flashing) * LED_PANIC 0 OFF ON (1Hz flashing)
*/ */
switch (led) switch (led)
{ {
+5 -5
View File
@@ -109,11 +109,11 @@
static uint32_t lpc31_ns2clk(uint32_t ns, uint32_t hclk2) static uint32_t lpc31_ns2clk(uint32_t ns, uint32_t hclk2)
{ {
/* delay (ns) * hclk (Hz) / scale (ns/sec) = cycles /* delay (ns) * hclk (Hz) / scale (ns/sec) = cycles
* *
* Example: ns=80, hclk2=90000000 * Example: ns=80, hclk2=90000000
* clocks = 80 * 90000000 / 1000000000 + 1 = 8 (actual 7.2 cycles) * clocks = 80 * 90000000 / 1000000000 + 1 = 8 (actual 7.2 cycles)
*/ */
uint64_t tmp = (uint64_t)ns * (uint64_t)hclk2 / 1000000000ull; uint64_t tmp = (uint64_t)ns * (uint64_t)hclk2 / 1000000000ull;
if (tmp > 0) if (tmp > 0)
@@ -37,7 +37,7 @@
* *
****************************************************************************/ ****************************************************************************/
/* LCD pin mapping (see configs/pcblogic-pic32mx/README.txt) /* LCD pin mapping (see configs/pcblogic-pic32mx/README.txt)
* *
* ----------------------------------- ---------- ---------------------------------- * ----------------------------------- ---------- ----------------------------------
* PIC32 LCD1602 PCBLogic PIN * PIC32 LCD1602 PCBLogic PIN
@@ -125,7 +125,7 @@ struct led_setting_s
}; };
#endif #endif
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/
/* If CONFIG_ARCH_LEDS is defined then NuttX will control the LEDs. The /* If CONFIG_ARCH_LEDS is defined then NuttX will control the LEDs. The
@@ -105,7 +105,7 @@ void weak_function pic32mx_usbdevinitialize(void)
*/ */
#ifdef CONFIG_USBHOST #ifdef CONFIG_USBHOST
// pic32mx_configgpio(GPIO_USB_VBUSON); //pic32mx_configgpio(GPIO_USB_VBUSON);
#endif #endif
/* "If the host PC sends a GetStatus (device) request, the firmware must respond /* "If the host PC sends a GetStatus (device) request, the firmware must respond
@@ -120,7 +120,7 @@ void weak_function pic32mx_usbdevinitialize(void)
*/ */
#ifdef CONFIG_USB_PWRSENSE #ifdef CONFIG_USB_PWRSENSE
// pic32mx_configgpio(GPIO_USB_PWRSENSE); //pic32mx_configgpio(GPIO_USB_PWRSENSE);
#endif #endif
} }
+1 -1
View File
@@ -128,7 +128,7 @@ struct led_setting_s
}; };
#endif #endif
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/
/* If CONFIG_ARCH_LEDS is defined then NuttX will control the LEDs. The /* If CONFIG_ARCH_LEDS is defined then NuttX will control the LEDs. The
+2 -2
View File
@@ -105,7 +105,7 @@ void weak_function pic32mx_usbdevinitialize(void)
*/ */
#ifdef CONFIG_USBHOST #ifdef CONFIG_USBHOST
// pic32mx_configgpio(GPIO_USB_VBUSON); //pic32mx_configgpio(GPIO_USB_VBUSON);
#endif #endif
/* "If the host PC sends a GetStatus (device) request, the firmware must respond /* "If the host PC sends a GetStatus (device) request, the firmware must respond
@@ -120,7 +120,7 @@ void weak_function pic32mx_usbdevinitialize(void)
*/ */
#ifdef CONFIG_USB_PWRSENSE #ifdef CONFIG_USB_PWRSENSE
// pic32mx_configgpio(GPIO_USB_PWRSENSE); //pic32mx_configgpio(GPIO_USB_PWRSENSE);
#endif #endif
} }
+4 -4
View File
@@ -153,10 +153,10 @@ void board_button_initialize(void)
{ {
uint32_t regval; uint32_t regval;
/* PB12 is set up as a system flash ERASE pin when the firmware boots. To /* PB12 is set up as a system flash ERASE pin when the firmware boots. To
* use the SW1, PB12 has to be configured as a normal regular I/O pin in * use the SW1, PB12 has to be configured as a normal regular I/O pin in
* the MATRIX module. For more information see the SAM V71 datasheet. * the MATRIX module. For more information see the SAM V71 datasheet.
*/ */
regval = getreg32(SAM_MATRIX_CCFG_SYSIO); regval = getreg32(SAM_MATRIX_CCFG_SYSIO);
regval |= MATRIX_CCFG_SYSIO_SYSIO12; regval |= MATRIX_CCFG_SYSIO_SYSIO12;
+2 -1
View File
@@ -1859,7 +1859,8 @@ static inline int stm32_lcdinitialize(FAR struct stm32_dev_s *priv)
lcddbg("LCD type: %d\n", priv->type); lcddbg("LCD type: %d\n", priv->type);
return ret; return ret;
} }
/************************************************************************************
/************************************************************************************
* Public Functions * Public Functions
************************************************************************************/ ************************************************************************************/
+1 -1
View File
@@ -290,6 +290,6 @@ int usbmsc_archinitialize(void)
#if defined(CONFIG_NSH_ARCHINIT) #if defined(CONFIG_NSH_ARCHINIT)
return OK; return OK;
#else #else
return board_app_initialize(); return board_app_initialize();
#endif #endif
} }
+1 -1
View File
@@ -130,7 +130,7 @@ void up_setled(int led, bool ledon)
void up_setleds(uint8_t ledset, uint8_t led_states_set) void up_setleds(uint8_t ledset, uint8_t led_states_set)
{ {
led_states_set ^= LED_ACTIVE_LOW; led_states_set ^= LED_ACTIVE_LOW;
if ((ledset & BOARD_USR_LED_BIT) == 0) if ((ledset & BOARD_USR_LED_BIT) == 0)
{ {
stm32_gpiowrite(GPIO_LED1, (led_states_set & BOARD_USR_LED_BIT) == 0); stm32_gpiowrite(GPIO_LED1, (led_states_set & BOARD_USR_LED_BIT) == 0);
+1 -1
View File
@@ -1118,7 +1118,7 @@ static inline void stm3220g_lcdinitialize(void)
} }
} }
/************************************************************************************** /**************************************************************************************
* Public Functions * Public Functions
**************************************************************************************/ **************************************************************************************/
+1 -1
View File
@@ -1117,7 +1117,7 @@ static inline void stm3240g_lcdinitialize(void)
} }
} }
/************************************************************************************** /**************************************************************************************
* Public Functions * Public Functions
**************************************************************************************/ **************************************************************************************/
+2 -2
View File
@@ -160,8 +160,8 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
#ifdef CONFIG_STM32F7_SPI4 #ifdef CONFIG_STM32F7_SPI4
void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected) void stm32_spi4select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{ {
spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert"); spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
}} }
uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid) uint8_t stm32_spi4status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
{ {
+1 -1
View File
@@ -114,7 +114,7 @@ struct led_setting_s
uint8_t error : 2; uint8_t error : 2;
}; };
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/
+1 -1
View File
@@ -37,7 +37,7 @@
* *
****************************************************************************/ ****************************************************************************/
/* LCD pin mapping (see configs/sure-pic32mx/README.txt) /* LCD pin mapping (see configs/sure-pic32mx/README.txt)
* *
* --------------------- ---------- ---------------------------------- * --------------------- ---------- ----------------------------------
* PIC32 Sure JP1 Sure Signal Description * PIC32 Sure JP1 Sure Signal Description
+1 -2
View File
@@ -105,10 +105,9 @@
# undef PIC32_HAVE_SD # undef PIC32_HAVE_SD
/* The Sure DB-DP11212 PIC32 General Purpose Demo Board has an SOIC (Flash or /* The Sure DB-DP11212 PIC32 General Purpose Demo Board has an SOIC (Flash or
* EEPROM) connected on SPI2: * EEPROM) connected on SPI2:
* *
*
* TMS/AN10/PMA13/RB10 UTIL_WP FLASH (U4) WP * TMS/AN10/PMA13/RB10 UTIL_WP FLASH (U4) WP
* TDO/AN11/PMA12/RB11 UTIL_CS FLASH (U4) CS * TDO/AN11/PMA12/RB11 UTIL_CS FLASH (U4) CS
*/ */
+2 -2
View File
@@ -117,7 +117,7 @@ void weak_function pic32mx_usbdevinitialize(void)
*/ */
#ifdef CONFIG_USBHOST #ifdef CONFIG_USBHOST
// pic32mx_configgpio(GPIO_USB_VBUSON); //pic32mx_configgpio(GPIO_USB_VBUSON);
#endif #endif
/* "If the host PC sends a GetStatus (device) request, the firmware must respond /* "If the host PC sends a GetStatus (device) request, the firmware must respond
@@ -132,7 +132,7 @@ void weak_function pic32mx_usbdevinitialize(void)
*/ */
#ifdef CONFIG_USB_PWRSENSE #ifdef CONFIG_USB_PWRSENSE
// pic32mx_configgpio(GPIO_USB_PWRSENSE); //pic32mx_configgpio(GPIO_USB_PWRSENSE);
#endif #endif
} }
+20 -20
View File
@@ -110,16 +110,16 @@ void at90usb_ledinit(void)
void board_led_on(int led) void board_led_on(int led)
{ {
/* ON OFF /* ON OFF
* LED_STARTED 0 OFF ON (never happens) * LED_STARTED 0 OFF ON (never happens)
* LED_HEAPALLOCATE 0 OFF ON (never happens) * LED_HEAPALLOCATE 0 OFF ON (never happens)
* LED_IRQSENABLED 0 OFF ON (never happens) * LED_IRQSENABLED 0 OFF ON (never happens)
* LED_STACKCREATED 1 ON ON (never happens) * LED_STACKCREATED 1 ON ON (never happens)
* LED_INIRQ 2 OFF NC (momentary) * LED_INIRQ 2 OFF NC (momentary)
* LED_SIGNAL 2 OFF NC (momentary) * LED_SIGNAL 2 OFF NC (momentary)
* LED_ASSERTION 2 OFF NC (momentary) * LED_ASSERTION 2 OFF NC (momentary)
* LED_PANIC 0 OFF ON (1Hz flashing) * LED_PANIC 0 OFF ON (1Hz flashing)
*/ */
switch (led) switch (led)
{ {
@@ -152,16 +152,16 @@ void board_led_on(int led)
void board_led_off(int led) void board_led_off(int led)
{ {
/* ON OFF /* ON OFF
* LED_STARTED 0 OFF ON (never happens) * LED_STARTED 0 OFF ON (never happens)
* LED_HEAPALLOCATE 0 OFF ON (never happens) * LED_HEAPALLOCATE 0 OFF ON (never happens)
* LED_IRQSENABLED 0 OFF ON (never happens) * LED_IRQSENABLED 0 OFF ON (never happens)
* LED_STACKCREATED 1 ON ON (never happens) * LED_STACKCREATED 1 ON ON (never happens)
* LED_INIRQ 2 OFF NC (momentary) * LED_INIRQ 2 OFF NC (momentary)
* LED_SIGNAL 2 OFF NC (momentary) * LED_SIGNAL 2 OFF NC (momentary)
* LED_ASSERTION 2 OFF NC (momentary) * LED_ASSERTION 2 OFF NC (momentary)
* LED_PANIC 0 OFF ON (1Hz flashing) * LED_PANIC 0 OFF ON (1Hz flashing)
*/ */
switch (led) switch (led)
{ {
+1 -1
View File
@@ -76,7 +76,7 @@
#ifdef CONFIG_TIVA_ADC #ifdef CONFIG_TIVA_ADC
int board_adc_initialize(void) int board_adc_initialize(void)
{ {
# if defined (CONFIG_TIVA_ADC) && defined (CONFIG_ADC) # if defined (CONFIG_TIVA_ADC) && defined (CONFIG_ADC)
static bool initialized = false; static bool initialized = false;
int ret; int ret;
+1 -1
View File
@@ -125,7 +125,7 @@ struct led_setting_s
}; };
#endif #endif
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/
/* If CONFIG_ARCH_LEDS is defined then NuttX will control the LEDs. The /* If CONFIG_ARCH_LEDS is defined then NuttX will control the LEDs. The
+2 -2
View File
@@ -609,8 +609,8 @@ int main(int argc, char **argv, char **envp)
tty.c_cflag &= ~(CSIZE|PARENB); tty.c_cflag &= ~(CSIZE|PARENB);
tty.c_cflag |= CS8; tty.c_cflag |= CS8;
(void)cfsetispeed(&tty, speed); (void)cfsetispeed(&tty, speed);
(void)cfsetospeed(&tty, speed); (void)cfsetospeed(&tty, speed);
ret = tcsetattr(g_fd, TCSANOW, &tty); ret = tcsetattr(g_fd, TCSANOW, &tty);
if (ret < 0) if (ret < 0)