Skip to content

Instantly share code, notes, and snippets.

@electronut
Last active October 29, 2017 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save electronut/cfda272f7f35684ed38057d23ab9b095 to your computer and use it in GitHub Desktop.
Save electronut/cfda272f7f35684ed38057d23ab9b095 to your computer and use it in GitHub Desktop.
stm32-returns-2
Conway64 conway(&hspi2);
int main(void)
{
/* Reset of all peripherals, Initializes the Flash interface and the Systick. */
HAL_Init();
/* Configure the system clock */
SystemClock_Config();
/* Initialize all configured peripherals */
MX_GPIO_Init();
MX_SPI2_Init();
MX_USART2_UART_Init();
/* Create the thread(s) */
/* definition and creation of defaultTask */
osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 128);
defaultTaskHandle = osThreadCreate(osThread(defaultTask), NULL);
/* USER CODE BEGIN RTOS_THREADS */
/* add threads, ... */
char str[] = "STM32 Returns...\n";
HAL_UART_Transmit(&huart2, (uint8_t*)str, strlen(str), 100);
conway.init();
/* USER CODE END RTOS_THREADS */
/* Start scheduler */
osKernelStart();
while (1)
{
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment