repo_name
stringlengths
5
122
path
stringlengths
3
232
text
stringlengths
6
1.05M
gevirl/seldup
bamutil.c
/** bamutil.c **/ /* *| File: bamutil.c |* *| |* *| Copyright (c) 2016-2018 University of Washington All rights reserved. |* *| ...
gevirl/seldup
bamutil.h
/** bamutil.h **/ /* *| File: bamutil.h |* *| |* *| Copyright (c) 2016-2018 University of Washington All rights reserved. |* *| ...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/rosserial/src/bsp/bsp.h
/* * bsp.h * * Created on: 2018. 3. 22. * Author: <NAME> */ #ifndef SRC_BSP_BSP_H_ #define SRC_BSP_BSP_H_ #include "def.h" #include "stm32f7xx_hal.h" #ifdef __cplusplus extern "C" { #endif void bspInit(void); void bspDeInit(void); #ifdef __cplusplus } #endif #endif /* SRC_BSP_BSP_H_ */
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink2/src/hw/core/timer.h
<gh_stars>1-10 /* * timer.h * * Created on: 2018. 3. 16. * Author: <NAME> */ #ifndef SRC_HW_CORE_TIMER_H_ #define SRC_HW_CORE_TIMER_H_ #include "hw_def.h" void timerInit(void); void timerSetISR(void (*func)(), uint32_t time_us); void timerStart(void); #endif /* SRC_HW_CORE_TIMER_H_ */
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink2/src/hw/core/button.c
<gh_stars>1-10 /* * button.c * * Created on: 2018. 3. 16. * Author: <NAME> */ #include "button.h" void buttonInit(void) { GPIO_InitTypeDef gpio_init_structure; gpio_init_structure.Pin = GPIO_PIN_12; gpio_init_structure.Mode = GPIO_MODE_INPUT; gpio_init_structure.Pull = GPIO_NOPULL; gpio...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/boot/src/ap/ap.c
<reponame>chcbaram/arm_seminar_fw<gh_stars>1-10 /* * ap.c * * Created on: 2018. 3. 16. * Author: <NAME> */ #include "ap.h" void timerISR(void) { static uint32_t cnt = 0; if (cnt%1000 == 0) { ledToggle(2); } cnt++; } void apInit(void) { timerSetISR(timerISR, 1000); timerStart(); ...
chcbaram/arm_seminar_fw
opencr/cr_downloader/cr_downloader/boot.c
/* * boot.c * * Created on: 2016. 7. 13. * Author: Baram */ #include "boot.h" #include "cmd.h" #include "util.h" #include "uart.h" #define BOOT_CMD_READ_VERSION 0x00 #define BOOT_CMD_READ_BOARD_NAME 0x01 #define BOOT_CMD_FLASH_ERASE 0x02 #define BOOT_CMD_FLASH_WRITE ...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink2/src/hw/hw.h
<filename>opencr/cr_exam/etc/led_blink2/src/hw/hw.h /* * hw.h * * Created on: 2018. 3. 16. * Author: <NAME> */ #ifndef SRC_HW_HW_H_ #define SRC_HW_HW_H_ #include "bsp.h" #include "hw_def.h" #include "core/led.h" #include "core/button.h" #include "core/pwm.h" #include "core/timer.h" #include "usb_cdc/usb...
chcbaram/arm_seminar_fw
opencr/cr_exam/basic/boot/src/ap/ap.c
/* * ap.c * * Created on: 2018. 3. 22. * Author: <NAME> */ #include "ap.h" void updateLed(void); void updateButton(void); void updateDownload(void); bool runJump(void); bool runDownload(void); bool runErase(void); void apInit(void) { } void apMain(void) { if (buttonGetPressed(0) == false) { ...
chcbaram/arm_seminar_fw
opencm9.04/opencm_bootloader/src/main.c
/* * main.c * * Created on: 2017. 3. 19. * Author: baram */ /* for OpenOCD -f interface/stlink-v2.cfg -f target/stm32f1x.cfg */ #include "main.h" void mainInit(void); void led_isr(void *arg) { ledToggle(0); } int main(void) { mainInit(); apMain(); return 0; } void mainInit(void) { ...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/rosserial/src/hw/core/button.h
<filename>opencr/cr_exam/etc/rosserial/src/hw/core/button.h /* * button.h * * Created on: 2018. 3. 22. * Author: <NAME> */ #ifndef SRC_HW_CORE_BUTTON_H_ #define SRC_HW_CORE_BUTTON_H_ #include "hw_def.h" #ifdef __cplusplus extern "C" { #endif void buttonInit(void); bool buttonGetPressed(uint8_t ch); ...
chcbaram/arm_seminar_fw
tutorial/04/mission_2/04_m2/src/ap/ap.c
/* * ap.c * * Created on: 2016. 7. 13. * Author: Baram */ #include "ap.h" int demoCmdif(int argc, char **argv); void apInit(void) { } void apMain(void) { cmdifBegin(_DEF_UART1, 115200); while(1) { cmdifLoop(); } }
chcbaram/arm_seminar_fw
opencm9.04/opencm_bootloader/src/hw/core/micros.c
/* * micros.c * * Created on: 2016. 7. 13. * Author: Baram */ #include "micros.h" #include "swtimer.h" void microsInit() { } uint32_t micros() { return swtimerGetMicroCounter(); }
chcbaram/arm_seminar_fw
opencr/cr_exam/basic/firmware/src/common/def.h
<filename>opencr/cr_exam/basic/firmware/src/common/def.h<gh_stars>1-10 /* * def.h * * Created on: 2018. 3. 22. * Author: <NAME> */ #ifndef SRC_COMMON_DEF_H_ #define SRC_COMMON_DEF_H_ #include <stdint.h> #include <stdbool.h> #endif /* SRC_COMMON_DEF_H_ */
chcbaram/arm_seminar_fw
opencm9.04/opencm_bootloader/src/hw/core/uart.c
<reponame>chcbaram/arm_seminar_fw /* * uart.c * * Created on: 2017. 2. 13. * Author: baram */ /* _HW_DEF_UART_CH_MAX : 2 _DEF_UART1 : VCP _DEF_UART2 : USART2 */ /* USART2 - RX : PD6, DMA1, Channel 4, Stream 5 - TX : PD5, DMA1, Channel 4, Stream 6 USART8 - RX : PE0, D...
chcbaram/arm_seminar_fw
opencm9.04/opencm_bootloader/src/hw/core/hwtimer.c
/* * hwtimer.c * * Created on: 2017. 2. 13. * Author: baram */ #include <stdarg.h> #include <stdbool.h> #include "hw.h" #include "hwtimer.h" typedef struct { TIM_HandleTypeDef hTIM; uint8_t enable; uint32_t freq; uint32_t prescaler_value; uint32_t prescaler_value_1M; uint32_t prescaler_div...
chcbaram/arm_seminar_fw
opencr/cr_firmware/src/ap/boot/boot.h
<gh_stars>1-10 /* * boot.h * * Created on: 2016. 5. 14. * Author: Baram */ #ifndef BOOT_H #define BOOT_H #ifdef __cplusplus extern "C" { #endif #include "def.h" #include "bsp.h" #include "hw.h" #define BOOT_ERR_INVAILD_CMD 0x00 void bootInit(void); void bootProcessCmd(cmd_t *p_cmd); voi...
chcbaram/arm_seminar_fw
tutorial/04/result/mission_1/04_m1/src/hw/core/usb.h
<gh_stars>1-10 /* * usb.h * * * * Created on: 2016. 5. 14. * Author: Baram */ #ifndef USB_H #define USB_H #ifdef __cplusplus extern "C" { #endif #include "def.h" #include "bsp.h" void usbInit(void); void usbDeInit(void); #ifdef __cplusplus } #endif #endif
chcbaram/arm_seminar_fw
opencm9.04/opencm_bootloader/src/ap/boot/boot.c
/* * ap.c * * Created on: 2016. 7. 13. * Author: Baram */ #include "ap.h" #include "boot.h" #define BOOT_CMD_READ_VERSION 0x00 #define BOOT_CMD_READ_BOARD_NAME 0x01 #define BOOT_CMD_FLASH_ERASE 0x02 #define BOOT_CMD_FLASH_WRITE 0x03 #define BOOT_CMD_FLASH_READ ...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/rosserial/src/hw/core/led.h
/* * led.h * * Created on: 2018. 3. 22. * Author: <NAME> */ #ifndef SRC_HW_CORE_LED_H_ #define SRC_HW_CORE_LED_H_ #include "hw_def.h" #ifdef __cplusplus extern "C" { #endif void ledInit(void); void ledOn(uint8_t ch); void ledOff(uint8_t ch); void ledToggle(uint8_t ch); #ifdef __cplusplus } #endif ...
chcbaram/arm_seminar_fw
opencr/cr_firmware/src/main.c
<gh_stars>1-10 /* * main.c * * Created on: 2017. 3. 19. * Author: baram */ #include "main.h" void mainInit(void); int main(void) { uint32_t t_time; uint32_t t_time_us; uint32_t cnt = 0.; uint32_t i; mainInit(); t_time = millis(); t_time_us = micros(); while(1) { if (mil...
chcbaram/arm_seminar_fw
opencm9.04/opencm_bootloader/src/bsp/bsp.h
/* * bsp.h * * boart support package * * Created on: 2017. 3. 16. * Author: Baram */ #ifndef BSP_H #define BSP_H #ifdef __cplusplus extern "C" { #endif #include <stdint.h> #include <stdbool.h> #include "def.h" #include "stm32f1xx.h" #include "stm32f1xx_hal.h" #include "usb_cdc/usbd_core.h" #inclu...
chcbaram/arm_seminar_fw
opencm9.04/opencm_bootloader/src/hw/hw_def.h
/* * hw_def.h * * Created on: 2016. 5. 14. * Author: Baram */ #ifndef HW_DEF_H #define HW_DEF_H #ifdef __cplusplus extern "C" { #endif #define _HW_DEF_SWTIMER_CH _DEF_TIMER1 #define _HW_DEF_UART_CH_MAX 2 #define _HW_DEF_SW_TIMER_MAX 8 #define _HW_DEF_CMDI...
chcbaram/arm_seminar_fw
tutorial/04/mission_3/04_m3/src/ap/ap.c
/* * ap.c * * Created on: 2016. 7. 13. * Author: Baram */ #include "ap.h" /* uint32_t pre_time; if (millis()-pre_time >= 100 ) { pre_time = millis(); // 100ms 마다 실행 } if (buttonGetPressed(0) == true) { //버튼 눌렸을 때 } */ void apInit(void) { } void apMain(void) { ...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink2/src/common/def.h
<gh_stars>1-10 /* * def.h * * Created on: 2018. 3. 16. * Author: <NAME> */ #ifndef SRC_COMMON_DEF_H_ #define SRC_COMMON_DEF_H_ #endif /* SRC_COMMON_DEF_H_ */
chcbaram/arm_seminar_fw
opencm9.04/opencm_bootloader/src/bsp/bsp.c
<reponame>chcbaram/arm_seminar_fw /* * bsp.c * * boart support package * * Created on: 2017. 3. 16. * Author: Baram */ #include "bsp.h" #include "hw.h" void SystemClock_Config(void); void bspInit() { GPIO_InitTypeDef GPIO_InitStruct; // STM32Cube HAL Init HAL_Init(); // Clock Setup...
chcbaram/arm_seminar_fw
tutorial/04/result/mission_1/04_m1/src/hw/core/buzzer.h
/* * buzzer.h * * Created on: 2016. 5. 14. * Author: Baram */ #ifndef BUZZER_H #define BUZZER_H #ifdef __cplusplus extern "C" { #endif #include "def.h" #include "bsp.h" bool buzzerInit(void); void buzzerStart(uint32_t frequency, uint32_t duration); void BuzzerStop(void); #ifdef __cplusplu...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink/src/hw/hw.h
<gh_stars>1-10 /* * hw.h * * Created on: 2018. 3. 16. * Author: <NAME> */ #ifndef SRC_HW_HW_H_ #define SRC_HW_HW_H_ #include "hw_def.h" #include "core/delay.h" #include "core/led.h" #include "usb_cdc/usb.h" #include "usb_cdc/vcp.h" void hwInit(void); uint32_t millis(void); #endif /* SRC_HW_HW_H_...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/firm_led/src/bsp/bsp.h
<reponame>chcbaram/arm_seminar_fw<gh_stars>1-10 /* * bsp.h * * Created on: 2018. 3. 19. * Author: <NAME> */ #ifndef SRC_BSP_BSP_H_ #define SRC_BSP_BSP_H_ #include "def.h" #include "stm32f7xx_hal.h" void bspInit(void); #endif /* SRC_BSP_BSP_H_ */
chcbaram/arm_seminar_fw
opencr/cr_downloader/cr_downloader/download.c
/* * download.c * * Created on: 2016. 7. 13. * Author: Baram */ #include "boot.h" #include "cmd.h" #include "util.h" #include "uart.h" #define FLASH_FW_SIZE (768*1024) // 768KB #define FLASH_FW_ADDR_START 0x08040000 #define FLASH_FW_ADDR_END (FLASH_FW_...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink/src/hw/core/delay.h
/* * delay.h * * Created on: 2018. 3. 16. * Author: <NAME> */ #ifndef SRC_HW_CORE_DELAY_H_ #define SRC_HW_CORE_DELAY_H_ #include "hw_def.h" void delayInit(void); void delay(uint32_t time_ms); #endif /* SRC_HW_CORE_DELAY_H_ */
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/rosserial/src/hw/core/led.c
<reponame>chcbaram/arm_seminar_fw /* * led.c * * Created on: 2018. 3. 22. * Author: <NAME> */ #include "led.h" void ledInit(void) { GPIO_InitTypeDef gpio_init_structure; /* Configure the GPIO_LED pin */ gpio_init_structure.Pin = GPIO_PIN_12; gpio_init_structure.Mode = GPIO_MODE_OUTPUT_PP; g...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/rosserial/src/hw/core/flash.c
<filename>opencr/cr_exam/etc/rosserial/src/hw/core/flash.c<gh_stars>1-10 /* * flash.c * * Created on: 2018. 3. 22. * Author: <NAME> */ #include "flash.h" #define ADDR_FLASH_SECTOR_0 ((uint32_t)0x08000000) /* Base address of Sector 0, 32 Kbytes */ #define ADDR_FLASH_SECTOR_1 ((uint32_t)0x0800800...
chcbaram/arm_seminar_fw
tutorial/05/result/mission_1/m1/main.c
<reponame>chcbaram/arm_seminar_fw<filename>tutorial/05/result/mission_1/m1/main.c #include <stdio.h> int main(int argc, char *argv[]) { int baud; int mode; if (argc == 4) { baud = strtol( argv[ 2 ], NULL, 10 ); mode = strtol( argv[ 3 ], NULL, 10 ); printf("Port : %s\n", argv[1]); printf("Baud...
chcbaram/arm_seminar_fw
opencr/cr_exam/basic/firmware/src/hw/hw.h
/* * hw.h * * Created on: 2018. 3. 22. * Author: <NAME> */ #ifndef SRC_HW_HW_H_ #define SRC_HW_HW_H_ #include "hw_def.h" #include "core/led.h" void hwInit(void); void delay(uint32_t time_ms); uint32_t millis(void); #endif /* SRC_HW_HW_H_ */
chcbaram/arm_seminar_fw
tutorial/04/result/mission_1/04_m1/src/hw/core/vcp.h
<reponame>chcbaram/arm_seminar_fw<filename>tutorial/04/result/mission_1/04_m1/src/hw/core/vcp.h /* * vcp.h * * virtual_com_port * * Created on: 2016. 5. 14. * Author: Baram, PBHP */ #ifndef VCP_H #define VCP_H #ifdef __cplusplus extern "C" { #endif #include "def.h" #include "bsp.h" void vcpIn...
chcbaram/arm_seminar_fw
opencr/cr_downloader/cr_downloader/main.c
<filename>opencr/cr_downloader/cr_downloader/main.c #include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <limits.h> #include "uart.h" #include "boot.h" #include "download.h" int main(int argc, char *argv[]) { long baud; printf("cr_bootloaer \r\n"); printf("ver : 1.0 \r\n...
chcbaram/arm_seminar_fw
opencr/cr_firmware/src/common/def_err.h
/* * def_err.h * * Created on: 2016. 5. 14. * Author: Baram */ #ifndef DEF_ERR_H #define DEF_ERR_H #define ERR_INVALID_CMD 100 #define ERR_INVALID_FW 242 #define ERR_FLASH_ADDR_ALIGN 243 #define ERR_FLASH_INVALID_ADDR 244 #define ERR_FLASH_ERROR ...
chcbaram/arm_seminar_fw
tutorial/03/01_basic_fw/src/main.c
<filename>tutorial/03/01_basic_fw/src/main.c<gh_stars>1-10 /* * main.c * * Created on: 2017. 3. 19. * Author: baram */ /* for OpenOCD -f opencr_openocd.cfg */ #include "main.h" void mainInit(void); int main(void) { mainInit(); apMain(); return 0; } void mainInit(void) { bspInit(); h...
chcbaram/arm_seminar_fw
opencr/cr_firmware/src/ap/boot/boot.c
<filename>opencr/cr_firmware/src/ap/boot/boot.c /* * ap.c * * Created on: 2016. 7. 13. * Author: Baram */ #include "ap.h" #include "boot.h" #define BOOT_CMD_READ_VERSION 0x00 #define BOOT_CMD_READ_BOARD_NAME 0x01 #define BOOT_CMD_FLASH_ERASE 0x02 #define BOOT_CMD_FLASH_WRITE ...
chcbaram/arm_seminar_fw
opencr/cr_downloader/cr_downloader/def.h
#ifndef DEF_H #define DEF_H #include <stdio.h> #include <stdarg.h> #include <stdbool.h> #include <string.h> #include <stdint.h> typedef struct { uint32_t ptr_in; uint32_t ptr_out; uint32_t length; uint8_t *p_buf; } ring_buf_t; typedef uint8_t err_code_t; #define OK 0 #define _DEF_U...
chcbaram/arm_seminar_fw
tutorial/04/result/mission_3/04_m3/src/ap/ap.c
/* * ap.c * * Created on: 2016. 7. 13. * Author: Baram */ #include "ap.h" void apInit(void) { } void apMain(void) { uint8_t button_state; uint32_t pre_time; uint32_t repeat_cnt; uartOpen(_DEF_UART1, 115200); button_state = 0; while(1) { switch(button_state) { case ...
chcbaram/arm_seminar_fw
opencr/cr_downloader/cr_downloader/util.h
/* * util.h * * Created on: 2017. 2. 13. * Author: baram */ #ifndef UTIL_H_ #define UTIL_H_ #include <stdint.h> #include <Windows.h> #include "def.h" #ifdef __cplusplus extern "C" { #endif uint32_t millis(void); void delay(uint32_t delay_ms); #ifdef __cplusplus } #endif #endif
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink/src/hw/core/delay.c
/* * delay.c * * Created on: 2018. 3. 16. * Author: <NAME> */ #include "delay.h" void delayInit(void) { } void delay(uint32_t time_ms) { HAL_Delay(time_ms); }
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink/src/main.c
<reponame>chcbaram/arm_seminar_fw /* * main.c * * Created on: 2018. 3. 16. * Author: <NAME> */ #include "main.h" int main(void) { bspInit(); hwInit(); apInit(); apMain(); return 0; }
chcbaram/arm_seminar_fw
tutorial/04/result/mission_2/04_m2/src/ap/ap.c
<reponame>chcbaram/arm_seminar_fw /* * ap.c * * Created on: 2016. 7. 13. * Author: Baram */ #include "ap.h" int demoCmdif(int argc, char **argv); void apInit(void) { } void apMain(void) { cmdifBegin(_DEF_UART1, 115200); cmdifAdd("demo", demoCmdif); while(1) { cmdifLoop(); } } //...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink/src/hw/usb_cdc/usb.c
/* * usb.c * * Created on: 2018. 3. 16. * Author: <NAME> */ #include "usb.h" USBD_HandleTypeDef USBD_Device; extern PCD_HandleTypeDef hpcd; void usbInit(void) { GPIO_InitTypeDef GPIO_InitStruct; __HAL_RCC_GPIOA_CLK_ENABLE(); __HAL_RCC_GPIOG_CLK_ENABLE(); /* Configure DM DP Pins - For...
chcbaram/arm_seminar_fw
opencm9.04/opencm_bootloader/src/hw/core/hwtimer.h
<gh_stars>1-10 /* * hwtimer.h * * Created on: 2017. 4. 7. * Author: baram */ #ifndef TIMER_H_ #define TIMER_H_ #ifdef __cplusplus extern "C" { #endif #include "hw_def.h" #include "bsp.h" bool hwtimerInit(void); void hwtimerStop(uint8_t channel); void hwtimerSetPeriod(uint8_t channel, uint32_t ...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/rosserial/src/hw/core/flash.h
/* * flash.h * * Created on: 2018. 3. 22. * Author: <NAME> */ #ifndef SRC_HW_CORE_FLASH_H_ #define SRC_HW_CORE_FLASH_H_ #include "hw_def.h" #ifdef __cplusplus extern "C" { #endif void flashInit(void); bool flashErase(uint32_t addr, uint32_t length); bool flashWrite(uint32_t addr, uint8_t *p_data, uint...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink2/src/hw/core/pwm.h
/* * pwm.h * * Created on: 2018. 3. 16. * Author: <NAME> */ #ifndef SRC_HW_CORE_PWM_H_ #define SRC_HW_CORE_PWM_H_ #include "hw_def.h" void pwmInit(void); void pwmWrite8(uint8_t pwm_data); #endif /* SRC_HW_CORE_PWM_H_ */
chcbaram/arm_seminar_fw
nucleo/nucleo_firmware/src/main.c
/* * main.c * * Created on: 2017. 3. 19. * Author: baram */ #include "main.h" void mainInit(void); int main(void) { uint32_t t_time; uint32_t cnt = 0; mainInit(); t_time = millis(); while(1) { if (millis()-t_time >= 1000) { t_time = millis(); uartPrintf(_DEF_UA...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink/src/hw/core/led.c
<gh_stars>1-10 /* * led.c * * Created on: 2018. 3. 16. * Author: <NAME> */ #include "led.h" void ledInit(void) { GPIO_InitTypeDef gpio_init_structure; /* Configure the GPIO_LED pin */ gpio_init_structure.Pin = GPIO_PIN_12; gpio_init_structure.Mode = GPIO_MODE_OUTPUT_PP; gpio_init_struct...
chcbaram/arm_seminar_fw
tutorial/03/01_basic_fw/src/bsp/bsp.c
<gh_stars>1-10 /* * bsp.c * * boart support package * * Created on: 2017. 3. 16. * Author: Baram */ #include "bsp.h" #include "hw.h" void bspInit() { // STM32Cube HAL Init HAL_Init(); // Clock Setup // SYSCLK(Hz) = 216000000 // HCLK(Hz) = 216000000 // HSE(Hz) = 25000...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink2/src/bsp/bsp.h
<filename>opencr/cr_exam/etc/led_blink2/src/bsp/bsp.h /* * bsp.h * * Created on: 2018. 3. 16. * Author: <NAME> */ #ifndef SRC_BSP_BSP_H_ #define SRC_BSP_BSP_H_ #include <stdint.h> #include <stdbool.h> #include "stm32f7xx.h" #include "stm32f7xx_hal.h" #include "stm32f7xx_hal_conf.h" #include "system_stm32...
chcbaram/arm_seminar_fw
tutorial/04/result/mission_1/04_m1/src/hw/core/buzzer.c
<reponame>chcbaram/arm_seminar_fw /* * buzzer.c * * Created on: 2016. 7. 13. * Author: Baram */ #include "hw.h" #include "buzzer.h" volatile int32_t buzzer_toggle_count; volatile uint8_t buzzer_timer = _HW_DEF_BUZZER_CH; volatile bool buzzer_enable = false; static void buzzerBegin(void); static ...
chcbaram/arm_seminar_fw
tutorial/04/result/mission_1/04_m1/src/hw/core/usb.c
/* * usb.c * * * Created on: 2016. 5. 14. * Author: Baram */ #include "usb.h" #include "usb_cdc/usbd_core.h" #include "usb_cdc/usbd_desc.h" #include "usb_cdc/usbd_cdc.h" #include "usb_cdc/usbd_cdc_interface.h" USBD_HandleTypeDef USBD_Device; void usbInit(void) { /* Init Device Library */ USBD_...
chcbaram/arm_seminar_fw
tutorial/05/mission_2/m2/main.c
<gh_stars>1-10 #include <stdio.h> #include <stdarg.h> #include <stdbool.h> #include <string.h> #include <stdint.h> #include <stdlib.h> uint32_t getFileSize(char *file_name); /* number = strtol( argv[ 2 ], NULL, 10 ); */ int main(int argc, char *argv[]) { return 0; } uint32_t getFileSize(char *file_name) ...
chcbaram/arm_seminar_fw
opencr/cr_downloader/cr_downloader/download.h
/* * download.h * * Created on: 2016. 5. 14. * Author: Baram */ #ifndef DOWNLOAD_H #define DOWNLOAD_H #ifdef __cplusplus extern "C" { #endif #include "def.h" int download(int argc, char *argv[]); #ifdef __cplusplus } #endif #endif
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink2/src/ap/ap.c
<gh_stars>1-10 /* * ap.c * * Created on: 2018. 3. 16. * Author: <NAME> */ #include "ap.h" void timerISR(void) { static uint32_t cnt = 0; if (cnt%1000 == 0) { ledToggle(2); } cnt++; } void apInit(void) { timerSetISR(timerISR, 1000); timerStart(); } void apMain(void) { uint32_t...
chcbaram/arm_seminar_fw
opencr/cr_downloader/cr_downloader/boot.h
<gh_stars>1-10 /* * boot.h * * Created on: 2016. 5. 14. * Author: Baram */ #ifndef BOOT_H #define BOOT_H #ifdef __cplusplus extern "C" { #endif #include "def.h" typedef struct { uint32_t tag; uint32_t date; uint32_t firmware_offset; uint32_t firmware_offset_version; uint32_t fir...
chcbaram/arm_seminar_fw
tutorial/05/mission_1/m1/main.c
#include <stdio.h> /* baud = strtol( argv[ 2 ], NULL, 10 ); mode = strtol( argv[ 3 ], NULL, 10 ); */ int main(int argc, char *argv[]) { int baud; int mode; return 0; }
chcbaram/arm_seminar_fw
opencr/cr_firmware/src/hw/hw_def.h
<reponame>chcbaram/arm_seminar_fw /* * hw_def.h * * Created on: 2016. 5. 14. * Author: Baram */ #ifndef HW_DEF_H #define HW_DEF_H #ifdef __cplusplus extern "C" { #endif #define _HW_DEF_BUZZER_CH _DEF_TIMER3 #define _HW_DEF_SWTIMER_CH _DEF_TIMER4 #define _HW_DEF_UART_...
chcbaram/arm_seminar_fw
opencr/cr_exam/etc/led_blink2/src/hw/core/timer.c
/* * timer.c * * Created on: 2018. 3. 16. * Author: <NAME> */ #include "timer.h" static TIM_HandleTypeDef TimHandle; static uint32_t uwPrescalerValue = 0; static void (*timer_isr_func)(void) = NULL; void timerInit(void) { } void timerSetISR(void (*func)(void), uint32_t time_us) { timer_isr_...
chcbaram/arm_seminar_fw
tutorial/03/01_basic_fw/src/ap/ap.c
<gh_stars>1-10 /* * ap.c * * Created on: 2016. 7. 13. * Author: Baram */ #include "ap.h" void apInit(void) { } void apMain(void) { uint32_t pre_time; pre_time = millis(); while(1) { // 500ms마다 점멸한다. // if (millis()-pre_time >= 500) { pre_time = millis(); ledT...
keltonhalbert/LOFT
src/include/loftcu.h
/* * Copyright (C) 2017-2020 <NAME>, Space Science and Engineering Center (SSEC), University of Wisconsin - Madison * Written by <NAME> at the University of Wisconsin - Madison, * Cooperative Institute for Meteorological Satellite Studies (CIMSS), * Space Science and Engineering Center (SSEC). Provided under the A...
keltonhalbert/LOFT
src/include/constants.h
#ifndef CONSTANTS_H #define CONSTANTS_H /* * Copyright (C) 2017-2020 <NAME>, Space Science and Engineering Center (SSEC), University of Wisconsin - Madison * Written by <NAME> at the University of Wisconsin - Madison, * Cooperative Institute for Meteorological Satellite Studies (CIMSS), * Space Science and Enginee...
keltonhalbert/LOFT
src/include/datastructs.h
<filename>src/include/datastructs.h // header file for reading CUDA compiled // stuffs #include <lofs-dirstruct.h> #include <lofs-hdf2nc.h> #ifndef DATASTRUCTS_H #define DATASTRUCTS_H /* * Copyright (C) 2017-2020 <NAME>, Space Science and Engineering Center (SSEC), University of Wisconsin - Madison * Written by <NAME...
keltonhalbert/LOFT
src/include/prefetch.h
<reponame>keltonhalbert/LOFT<gh_stars>1-10 #include "datastructs.h" #include <lofs-dirstruct.h> #include <lofs-hdf2nc.h> #ifndef PREFETCH_H #define PREFETCH_H void prefetch_parcels_cpu(iocfg *io, parcel_pos *parcels, cudaStream_t memStream); void prefetch_model_gpu(iocfg *io, model_data *data, long bufsize, cudaStream_...
keltonhalbert/LOFT
src/include/integrate.h
#include <iostream> #include "datastructs.h" #ifndef INTEGRATE_H #define INTEGRATE_H /* * Copyright (C) 2017-2020 <NAME>, Space Science and Engineering Center (SSEC), University of Wisconsin - Madison * Written by <NAME> at the University of Wisconsin - Madison, * Cooperative Institute for Meteorological Satellite S...
AndersenSemenov/UTBotCpp
server/src/printers/TestMakefilesPrinter.h
<filename>server/src/printers/TestMakefilesPrinter.h /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_TESTMAKEFILESPRINTER_H #define UNITTESTBOT_TESTMAKEFILESPRINTER_H #include "NativeMakefilePrinter.h" namespace printer { class TestMakefilesContent { ...
AndersenSemenov/UTBotCpp
server/src/stubs/Stubs.h
<reponame>AndersenSemenov/UTBotCpp /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_STUBS_H #define UNITTESTBOT_STUBS_H #include "utils/CollectionUtils.h" #include <string> #include <unordered_set> #include <vector> #include "utils/path/FileSystemPath.h" stru...
AndersenSemenov/UTBotCpp
server/src/visitors/VerboseParameterVisitor.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_VERBOSEPARAMETERVISITOR_H #define UNITTESTBOT_VERBOSEPARAMETERVISITOR_H #include "AbstractValueViewVisitor.h" #include "Tests.h" namespace printer { class TestsPrinter; } namespace visitor { class Verb...
AndersenSemenov/UTBotCpp
server/src/testgens/FileTestGen.h
<reponame>AndersenSemenov/UTBotCpp /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_FileTESTGEN_H #define UNITTESTBOT_FileTESTGEN_H #include "ProjectTestGen.h" class FileTestGen final : public ProjectTestGen { public: fs::path filepath; FileTestGen(c...
AndersenSemenov/UTBotCpp
server/src/streams/stubs/ServerStubsWriter.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_VSCODESTUBSWRITER_H #define UNITTESTBOT_VSCODESTUBSWRITER_H #include "StubsWriter.h" class ServerStubsWriter : public StubsWriter { public: explicit ServerStubsWriter(grpc::ServerWriter<testsgen::StubsRespon...
AndersenSemenov/UTBotCpp
server/src/Synchronizer.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_SYNCHRONIZER_H #define UNITTESTBOT_SYNCHRONIZER_H #include "ProjectContext.h" #include "stubs/StubGen.h" #include "types/Types.h" class StubOperator { public: StubOperator(fs::path sourceFilePath, bool isHe...
AndersenSemenov/UTBotCpp
server/src/stubs/StubGen.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_STUBGEN_H #define UNITTESTBOT_STUBGEN_H #include "KleeGenerator.h" #include "testgens/BaseTestGen.h" #include "utils/TimeUtils.h" #include "utils/path/FileSystemPath.h" #include <unordered_map> #include <vector>...
AndersenSemenov/UTBotCpp
server/src/streams/coverage/CLICoverageAndResultsWriter.h
<reponame>AndersenSemenov/UTBotCpp /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_CLICOVERAGEANDRESULTSWRITER_H #define UNITTESTBOT_CLICOVERAGEANDRESULTSWRITER_H #include "CoverageAndResultsWriter.h" class CLICoverageAndResultsWriter : public CoverageAndRes...
AndersenSemenov/UTBotCpp
server/src/types/TypesResolver.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_TYPESRESOLVER_H #define UNITTESTBOT_TYPESRESOLVER_H #include "types/Types.h" #include <clang/AST/Decl.h> #include <string> #include <utility> class Fetcher; class TypesResolver { private: const Fetcher *c...
AndersenSemenov/UTBotCpp
server/test/suites/syntax/pointer_parameters.c
<filename>server/test/suites/syntax/pointer_parameters.c /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #include "pointer_parameters.h" int c_strcmp(const char *a, const char *b) { for (int i = 0;; i++) { if (a[i] != b[i]) { return 0; } else { ...
AndersenSemenov/UTBotCpp
server/src/printers/NativeMakefilePrinter.h
<gh_stars>0 /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_NATIVEMAKEFILEPRINTER_H #define UNITTESTBOT_NATIVEMAKEFILEPRINTER_H #include "BuildResult.h" #include "printers/DefaultMakefilePrinter.h" #include "testgens/BaseTestGen.h" #include "utils/path/FileSy...
AndersenSemenov/UTBotCpp
server/src/visitors/KleeAssumeReturnValueVisitor.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_KLEEASSUMERETURNVALUEVISITOR_H #define UNITTESTBOT_KLEEASSUMERETURNVALUEVISITOR_H #include "KleeAssumeVisitor.h" #include "Tests.h" namespace visitor { class KleeAssumeReturnValueVisitor : public KleeAssumeV...
AndersenSemenov/UTBotCpp
server/src/building/Linker.h
<reponame>AndersenSemenov/UTBotCpp /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_LINKER_H #define UNITTESTBOT_LINKER_H #include "BuildResult.h" #include "IRParser.h" #include "KleeGenerator.h" #include "RunCommand.h" #include "printers/DefaultMakefilePrinter...
AndersenSemenov/UTBotCpp
server/src/exceptions/LLVMException.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_LLVMEXCEPTION_H #define UNITTESTBOT_LLVMEXCEPTION_H #include "BaseException.h" struct LLVMException : public BaseException { explicit LLVMException(std::string message) : BaseException(std::move(message)) { ...
AndersenSemenov/UTBotCpp
server/src/printers/Printer.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_PRINTER_H #define UNITTESTBOT_PRINTER_H #include "Language.h" #include "Tests.h" #include "building/BuildDatabase.h" #include "stubs/Stubs.h" #include "utils/path/FileSystemPath.h" #include "types/Types.h" #incl...
AndersenSemenov/UTBotCpp
server/src/visitors/AssertsVisitor.h
<reponame>AndersenSemenov/UTBotCpp<filename>server/src/visitors/AssertsVisitor.h /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_ASSERTSVISITOR_H #define UNITTESTBOT_ASSERTSVISITOR_H #include "AbstractValueViewVisitor.h" #include "printers/TestsPrinter.h" #in...
AndersenSemenov/UTBotCpp
server/src/Tests.h
<filename>server/src/Tests.h /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_TESTS_H #define UNITTESTBOT_TESTS_H #include "Include.h" #include "LineInfo.h" #include "types/Types.h" #include "utils/CollectionUtils.h" #include "utils/PrinterUtils.h" #include <k...
AndersenSemenov/UTBotCpp
server/test/suites/regression/PR-200/PR-200.c
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #include "pair.h" struct double_pair { struct pair *p1; struct pair *p2; }; int sum_double_pairs(struct double_pair *p) { return sum(p->p1) + sum(p->p2); }
AndersenSemenov/UTBotCpp
server/src/printers/HeaderPrinter.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_HEADERPRINTER_H #define UNITTESTBOT_HEADERPRINTER_H #include "Printer.h" #include "ProjectContext.h" #include "types/Types.h" namespace printer { class HeaderPrinter : Printer { public: HeaderPri...
AndersenSemenov/UTBotCpp
server/src/types/ArrayType.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_ARRAYTYPE_H #define UNITTESTBOT_ARRAYTYPE_H #include "AbstractType.h" class ArrayType : public AbstractType { public: explicit ArrayType(unsigned long int size, bool complete) : size(size), complete(complete...
AndersenSemenov/UTBotCpp
server/src/testgens/FunctionTestGen.h
<gh_stars>0 /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_FunctionTESTGEN_H #define UNITTESTBOT_FunctionTESTGEN_H #include "LineTestGen.h" #include "ProjectTestGen.h" class FunctionTestGen final : public LineTestGen { public: FunctionTestGen(const tests...
AndersenSemenov/UTBotCpp
server/test/suites/regression/PR-200/pair.c
<gh_stars>0 /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #include "pair.h" struct pair { int x, y; }; int sum(struct pair *p) { if (p) { return p->x + p->y; } return 0; }
AndersenSemenov/UTBotCpp
server/src/coverage/CoverageTool.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_COVERAGETOOL_H #define UNITTESTBOT_COVERAGETOOL_H #include "Coverage.h" #include "ProjectContext.h" #include "UnitTest.h" #include "streams/IStreamWriter.h" #include "streams/WriterUtils.h" #include "utils/Makefi...
AndersenSemenov/UTBotCpp
server/src/visitors/KleeAssumeVisitor.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_KLEEASSUMEVISITOR_H #define UNITTESTBOT_KLEEASSUMEVISITOR_H #include "AbstractValueViewVisitor.h" #include "Tests.h" #include "printers/KleePrinter.h" namespace visitor { class KleeAssumeVisitor : public Abs...
AndersenSemenov/UTBotCpp
server/src/coverage/GcovCoverageTool.h
<filename>server/src/coverage/GcovCoverageTool.h<gh_stars>0 /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_GCOVCOVERAGETOOL_H #define UNITTESTBOT_GCOVCOVERAGETOOL_H #include "Coverage.h" #include "CoverageAndResultsGenerator.h" #include "CoverageTool.h" clas...
AndersenSemenov/UTBotCpp
server/src/utils/LogUtils.h
<gh_stars>0 /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_LOGUTIL_H #define UNITTESTBOT_LOGUTIL_H #include "TimeUtils.h" #include "utils/path/FileSystemPath.h" class Server; namespace LogUtils { static const std::string TEST_CLIENT = "UnitTestBot"; ...
AndersenSemenov/UTBotCpp
server/src/utils/StringUtils.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_STRINGUTIL_H #define UNITTESTBOT_STRINGUTIL_H #include "StringFormat.h" #include "CollectionUtils.h" #include "utils/path/FileSystemPath.h" #include <iterator> #include <memory> #include <sstream> #include <stri...
AndersenSemenov/UTBotCpp
server/src/printers/KleePrinter.h
<filename>server/src/printers/KleePrinter.h /* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_KLEEPRINTER_H #define UNITTESTBOT_KLEEPRINTER_H #include "PathSubstitution.h" #include "Printer.h" #include "ProjectContext.h" #include "Tests.h" #include "LineInfo.h" ...
AndersenSemenov/UTBotCpp
server/src/clang-utils/SourceToHeaderRewriter.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_SOURCETOHEADERREWRITER_H #define UNITTESTBOT_SOURCETOHEADERREWRITER_H #include "Paths.h" #include "SettingsContext.h" #include "SimpleFrontendActionFactory.h" #include "Tests.h" #include "building/BuildDatabase.h...
AndersenSemenov/UTBotCpp
server/src/printers/CCJsonPrinter.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_CCJSONPRINTER_H #define UNITTESTBOT_CCJSONPRINTER_H #include "KleeGenerator.h" #include "Printer.h" #include <string> namespace printer { class CCJsonPrinter : Printer { public: static const std...
AndersenSemenov/UTBotCpp
server/test/suites/regression/PR-200/pair.h
/* * Copyright (c) Huawei Technologies Co., Ltd. 2012-2021. All rights reserved. */ #ifndef UNITTESTBOT_PAIR_H #define UNITTESTBOT_PAIR_H struct pair; int sum(struct pair *p); #endif // UNITTESTBOT_PAIR_H