Skip to content

Commit

Permalink
Процесс перелопачивания.
Browse files Browse the repository at this point in the history
  • Loading branch information
7134956 committed Jan 23, 2016
1 parent 5dd1f1e commit e778960
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 44 deletions.
16 changes: 16 additions & 0 deletions BMS/proj_Keil/EBikeBMS.uvoptx
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,22 @@
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
<Bp>
<Number>10</Number>
<Type>0</Type>
<LineNumber>43</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>0</BreakIfRCount>
<Filename>&lt;2&gt;..\src\dma.c</Filename>
<ExecCommand></ExecCommand>
<Expression></Expression>
</Bp>
</Breakpoint>
<Tracepoint>
<THDelay>0</THDelay>
Expand Down
50 changes: 11 additions & 39 deletions main/proj_Keil/EBikeMain.uvoptx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
<Type>0</Type>
<LineNumber>53</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134221920</Address>
<Address>134221928</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
Expand All @@ -228,41 +228,9 @@
<Bp>
<Number>2</Number>
<Type>0</Type>
<LineNumber>68</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134226538</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>&lt;2&gt;..\src\dma.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\EBikeMain\../src/dma.c\68</Expression>
</Bp>
<Bp>
<Number>3</Number>
<Type>0</Type>
<LineNumber>66</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134226530</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>&lt;2&gt;..\src\dma.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\EBikeMain\../src/dma.c\66</Expression>
</Bp>
<Bp>
<Number>4</Number>
<Type>0</Type>
<LineNumber>69</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134226542</Address>
<Address>134226452</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
Expand All @@ -274,20 +242,20 @@
<Expression>\\EBikeMain\../src/dma.c\69</Expression>
</Bp>
<Bp>
<Number>5</Number>
<Number>3</Number>
<Type>0</Type>
<LineNumber>70</LineNumber>
<LineNumber>43</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134226552</Address>
<Address>0</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<BreakIfRCount>0</BreakIfRCount>
<Filename>&lt;2&gt;..\src\dma.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\EBikeMain\../src/dma.c\70</Expression>
<Expression></Expression>
</Bp>
</Breakpoint>
<WatchWindow1>
Expand Down Expand Up @@ -362,6 +330,10 @@
<Name>System Viewer\DMA1</Name>
<WinId>35905</WinId>
</Entry>
<Entry>
<Name>System Viewer\RCC</Name>
<WinId>35904</WinId>
</Entry>
</SystemViewers>
</TargetOption>
</Target>
Expand Down
1 change: 1 addition & 0 deletions main/proj_Keil/RTE/RTE_Components.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@
#define RTE_DEVICE_STDPERIPH_SPI
#define RTE_DEVICE_STDPERIPH_TIM
#define RTE_DEVICE_STDPERIPH_USART
#define RTE_DEVICE_STDPERIPH_WWDG

#endif /* RTE_COMPONENTS_H */
4 changes: 2 additions & 2 deletions main/src/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
/* Display driver */
//u8g_InitComFn(&u8g, &u8g_dev_st7586s_hw_spi, u8g_com_hw_spi_fn); //Minimal RAM mode
//u8g_InitComFn(&u8g, &u8g_dev_st7586s_4x_hw_spi, u8g_com_hw_spi_fn); //Speed mode
//8g_InitComFn(&u8g, &u8g_dev_st7586s_20x_hw_spi, u8g_com_hw_spi_fn); //Max speed mode
#define U8G_INIT u8g_InitComFn(&u8g, &u8g_dev_st7586s_20x_hw_spi, u8g_com_hw_spi_9bit_fn); //Max speed mode. 3-wire SPI
#define U8G_INIT u8g_InitComFn(&u8g, &u8g_dev_st7586s_20x_hw_spi, u8g_com_hw_spi_fn); //Max speed mode
//u8g_InitComFn(&u8g, &u8g_dev_st7586s_20x_hw_spi, u8g_com_hw_spi_9bit_fn); //Max speed mode. 3-wire SPI
//u8g_InitComFn(&u8g, &u8g_dev_st7669a_4x_hw_spi, u8g_com_hw_spi_fn); //Speed mode
//u8g_InitComFn(&u8g, &u8g_dev_sh1106_128x64_i2c, u8g_com_hw_i2c_fn); //

Expand Down
5 changes: 3 additions & 2 deletions main/src/dma.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "dma.h"
#include "stm32f10x.h"
#include "led.h"

/*******************************************************************************
*Настройка блока DMA
Expand Down Expand Up @@ -54,7 +55,7 @@ void DMA1_Channel3_IRQHandler(void) {
/* Disable DMA1_Channel3 */
DMA1_Channel3->CCR &= (uint16_t) (~DMA_CCR3_EN);
/* Disable clock DMA1 */
RCC->AHBENR &= ~RCC_AHBENR_DMA1EN;
// RCC->AHBENR &= ~RCC_AHBENR_DMA1EN;
}
}

Expand All @@ -66,7 +67,7 @@ void SPI_DMA_Send(uint16_t count) {
// Wait transmit complete
;
/* Enable clock DMA1 */
RCC->AHBENR |= RCC_AHBENR_DMA1EN;
// RCC->AHBENR |= RCC_AHBENR_DMA1EN;
/* Set data counter for DMA1 Channel3 */
DMA1_Channel3->CNDTR = count;
/* Enable DMA1 Channel3 */
Expand Down
5 changes: 5 additions & 0 deletions main/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "menu.h"
#include "power.h"
#include "bms.h"
#include "led.h"
#include "wdg.h"

#ifdef SYSTEM_STM32
#include "timer.h"
Expand Down Expand Up @@ -260,13 +262,16 @@ void mainLoop() {
TIM_Cmd(TIM4, ENABLE); //Включаем таймер
TIM_SetCounter(TIM4, 0);//Обнуляем счетчик
#endif
set_leds(LED_BLUE); //Потушили диод пошли спать
redrawDisplay();
reset_leds(LED_BLUE); //Потушили диод пошли спать
#ifdef DEBUG_DISPLAY
track.circleTics=TIM_GetCounter(TIM4); //Считали значение счетчика. 32768 импульсов в секунду
#endif
state.taskList &= ~TASK_REDRAW;
}
setPowerState(state.powerMode);
// WWDG_Renew();
}
}

Expand Down
1 change: 0 additions & 1 deletion main/src/mtk/mtk.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ void mtk_elementDateTime(mtk_t *mtk) {
} else
u8g_SetDefaultForegroundColor(mtk->u8g);
if (mtk->element->type == ELEMENT_DATE) {

switch (i) {
case 0:
sprintf(sTemp, "%02d", tm->tm_mday);
Expand Down

0 comments on commit e778960

Please sign in to comment.