Skip to content

Instantly share code, notes, and snippets.

@pr1metine
Created May 14, 2024 08:41
Show Gist options
  • Save pr1metine/d3f37144fbeff457cc3b172bafa0cf9d to your computer and use it in GitHub Desktop.
Save pr1metine/d3f37144fbeff457cc3b172bafa0cf9d to your computer and use it in GitHub Desktop.
HALCoGen Hercules + RODOS
/* USER CODE BEGIN (0) */
/* USER CODE END */
/* Include Files */
#include "HL_sys_common.h"
/* USER CODE BEGIN (1) */
#include "HL_gio.h"
/* USER CODE END */
/** @fn void main(void)
* @brief Application main function
* @note This function is empty by default.
*
* This function is called after startup.
* The user can use this function to implement the application.
*/
/* USER CODE BEGIN (2) */
#define DELAY_VALUE 10000000
/* USER CODE END */
int MAIN(void) {
/* USER CODE BEGIN (3) */
int i;
gioInit();
gioPORTB->DIR = (0x01 << 6); // configure GIOB[6] as output
for (;;) {
gioToggleBit(gioPORTB, 6);
for (i = 0; i < DELAY_VALUE; i++);
}
/* USER CODE END */
return 0;
}
/* USER CODE BEGIN (4) */
/* USER CODE END */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment