fixed sd card
This commit is contained in:
@@ -57,7 +57,6 @@ void DebugMon_Handler(void);
|
||||
void PendSV_Handler(void);
|
||||
void SysTick_Handler(void);
|
||||
void RTC_Alarm_IRQHandler(void);
|
||||
|
||||
void EXTI15_10_IRQHandler(void);
|
||||
void TIM4_IRQHandler(void);
|
||||
/* USER CODE BEGIN EFP */
|
||||
|
||||
@@ -597,6 +597,13 @@ int main(void)
|
||||
|
||||
transmit_uart("Resetting motor position and calculating new dates and times.\r\n");
|
||||
|
||||
BSP_MotorControl_Move(0, FORWARD, 300);
|
||||
BSP_MotorControl_WaitWhileActive(0);
|
||||
BSP_MotorControl_Move(0, FORWARD, 300);
|
||||
BSP_MotorControl_WaitWhileActive(0);
|
||||
BSP_MotorControl_Move(0, FORWARD, 300);
|
||||
BSP_MotorControl_WaitWhileActive(0);
|
||||
|
||||
BSP_MotorControl_GoHome(0);
|
||||
BSP_MotorControl_WaitWhileActive(0);
|
||||
|
||||
@@ -619,6 +626,16 @@ int main(void)
|
||||
transmit_uart("File was not opened!\r\n");
|
||||
}
|
||||
|
||||
f_puts("Cancer", &fil);
|
||||
|
||||
/* Close file */
|
||||
fres = f_close(&fil);
|
||||
if (fres == FR_OK) {
|
||||
transmit_uart("File is closed.\r\n");
|
||||
} else if (fres != FR_OK) {
|
||||
transmit_uart("File was not closed.\r\n");
|
||||
}
|
||||
|
||||
//Calculate sunrise and sunset time for tomorrow
|
||||
calc_sunrise_sunset(&initialDate, &sunrise, &sunset, &tomorrowsDate);
|
||||
|
||||
@@ -906,6 +923,9 @@ static void MX_GPIO_Init(void)
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(GPIOB, GPIO_PIN_6, GPIO_PIN_SET);
|
||||
|
||||
/*Configure GPIO pin : B1_Pin */
|
||||
GPIO_InitStruct.Pin = B1_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING;
|
||||
|
||||
Reference in New Issue
Block a user