From 1f97f644e9f577bdcdcd03620cb31accd5ea8a42 Mon Sep 17 00:00:00 2001 From: "bsongis@gmail.com" Date: Tue, 7 May 2013 16:20:20 +0000 Subject: [PATCH] Cosmetics --- src/Makefile | 2 +- src/targets/taranis/aspi.cpp | 32 ++++++++++++++++---------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/Makefile b/src/Makefile index 52fff10ac..89416b2f1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -624,7 +624,7 @@ ifeq ($(PCB), TARANIS) ifeq ($(HUBSAN), YES) CPPDEFS += -DHUBSAN CPPSRC += protocols/hubsan.cpp - # SRC += targets/sky9x/syscalls.c + CPPSRC += targets/taranis/a7105_driver.cpp endif endif diff --git a/src/targets/taranis/aspi.cpp b/src/targets/taranis/aspi.cpp index d610068e8..1d6f0579e 100644 --- a/src/targets/taranis/aspi.cpp +++ b/src/targets/taranis/aspi.cpp @@ -40,18 +40,19 @@ void AspiCmd(u8 Command_Byte) LCD_CLK_HIGH(); LCD_NCS_LOW(); - while (i--) - { - LCD_CLK_LOW(); - if(Command_Byte&0x80) - { + while (i--) { + LCD_CLK_LOW(); + + if (Command_Byte&0x80) LCD_MOSI_HIGH(); + else + LCD_MOSI_LOW(); + + Command_Byte <<= 1; + + LCD_CLK_HIGH(); } - else LCD_MOSI_LOW(); - Command_Byte=Command_Byte<<1; - LCD_CLK_HIGH(); - } LCD_NCS_HIGH(); LCD_A0_HIGH(); } @@ -86,13 +87,12 @@ void AspiData(u8 Para_data) LCD_CLK_HIGH(); LCD_A0_HIGH(); LCD_NCS_LOW(); - while (i--) - { - if(Para_data&0x80) - { - LCD_MOSI_HIGH(); - }else LCD_MOSI_LOW(); - Para_data<<=1; + while (i--) { + if (Para_data&0x80) + LCD_MOSI_HIGH(); + else + LCD_MOSI_LOW(); + Para_data <<= 1; LCD_CLK_LOW(); __no_operation(); LCD_CLK_HIGH();