Opening brace tweaks

This commit is contained in:
Scott Lahteine
2017-12-25 09:29:41 -06:00
parent a142fab155
commit 1a827d5b68
11 changed files with 39 additions and 77 deletions

View File

@ -118,22 +118,18 @@
spiSend((uint8_t)arg_val);
break;
case U8G_COM_MSG_WRITE_SEQ:
{
case U8G_COM_MSG_WRITE_SEQ: {
uint8_t *ptr = (uint8_t*) arg_ptr;
while( arg_val > 0 )
{
while (arg_val > 0) {
spiSend(*ptr++);
arg_val--;
}
}
break;
case U8G_COM_MSG_WRITE_SEQ_P:
{
case U8G_COM_MSG_WRITE_SEQ_P: {
uint8_t *ptr = (uint8_t*) arg_ptr;
while( arg_val > 0 )
{
while (arg_val > 0) {
spiSend(*ptr++);
arg_val--;
}

View File

@ -160,8 +160,7 @@
return u8g_i2c_stop(), 0;
{
register uint8_t *ptr = (uint8_t *)arg_ptr;
while( arg_val > 0 )
{
while (arg_val > 0) {
if ( u8g_i2c_send_byte(*ptr++) == 0 )
return u8g_i2c_stop(), 0;
arg_val--;
@ -176,8 +175,7 @@
return u8g_i2c_stop(), 0;
{
register uint8_t *ptr = (uint8_t *)arg_ptr;
while( arg_val > 0 )
{
while (arg_val > 0) {
if ( u8g_i2c_send_byte(u8g_pgm_read(ptr)) == 0 )
return 0;
ptr++;

View File

@ -239,8 +239,7 @@ void u8g_i2c_init_sw(uint8_t clock_option) {
return u8g_i2c_stop_sw(), 0;
{
register uint8_t *ptr = (uint8_t *)arg_ptr;
while( arg_val > 0 )
{
while (arg_val > 0) {
if ( u8g_i2c_send_byte_sw(*ptr++) == 0 )
return u8g_i2c_stop_sw(), 0;
arg_val--;
@ -255,8 +254,7 @@ void u8g_i2c_init_sw(uint8_t clock_option) {
return u8g_i2c_stop_sw(), 0;
{
register uint8_t *ptr = (uint8_t *)arg_ptr;
while( arg_val > 0 )
{
while (arg_val > 0) {
if ( u8g_i2c_send_byte_sw(u8g_pgm_read(ptr)) == 0 )
return 0;
ptr++;

View File

@ -136,22 +136,18 @@
u8g_com_LPC1768_st7920_write_byte_hw_spi(u8g->pin_list[U8G_PI_A0_STATE], arg_val);
break;
case U8G_COM_MSG_WRITE_SEQ:
{
case U8G_COM_MSG_WRITE_SEQ: {
uint8_t *ptr = (uint8_t*) arg_ptr;
while( arg_val > 0 )
{
while (arg_val > 0) {
u8g_com_LPC1768_st7920_write_byte_hw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
arg_val--;
}
}
break;
case U8G_COM_MSG_WRITE_SEQ_P:
{
case U8G_COM_MSG_WRITE_SEQ_P: {
uint8_t *ptr = (uint8_t*) arg_ptr;
while( arg_val > 0 )
{
while (arg_val > 0) {
u8g_com_LPC1768_st7920_write_byte_hw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
arg_val--;
}

View File

@ -170,22 +170,18 @@
u8g_com_LPC1768_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], arg_val);
break;
case U8G_COM_MSG_WRITE_SEQ:
{
case U8G_COM_MSG_WRITE_SEQ: {
uint8_t *ptr = (uint8_t*) arg_ptr;
while( arg_val > 0 )
{
while (arg_val > 0) {
u8g_com_LPC1768_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
arg_val--;
}
}
break;
case U8G_COM_MSG_WRITE_SEQ_P:
{
case U8G_COM_MSG_WRITE_SEQ_P: {
uint8_t *ptr = (uint8_t*) arg_ptr;
while( arg_val > 0 )
{
while (arg_val > 0) {
u8g_com_LPC1768_st7920_write_byte_sw_spi(u8g->pin_list[U8G_PI_A0_STATE], *ptr++);
arg_val--;
}

View File

@ -150,22 +150,18 @@ uint8_t u8g_com_HAL_LPC1768_sw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val,
u8g_sw_spi_HAL_LPC1768_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], arg_val);
break;
case U8G_COM_MSG_WRITE_SEQ:
{
case U8G_COM_MSG_WRITE_SEQ: {
uint8_t *ptr = (uint8_t *)arg_ptr;
while( arg_val > 0 )
{
while (arg_val > 0) {
u8g_sw_spi_HAL_LPC1768_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], *ptr++);
arg_val--;
}
}
break;
case U8G_COM_MSG_WRITE_SEQ_P:
{
case U8G_COM_MSG_WRITE_SEQ_P: {
uint8_t *ptr = (uint8_t *)arg_ptr;
while( arg_val > 0 )
{
while (arg_val > 0) {
u8g_sw_spi_HAL_LPC1768_shift_out(u8g->pin_list[U8G_PI_MOSI], u8g->pin_list[U8G_PI_SCK], u8g_pgm_read(ptr));
ptr++;
arg_val--;