Skip to content

Instantly share code, notes, and snippets.

@hunandy14
hunandy14 / CudaMem.cuh
Created January 12, 2018 04:08
Cuda記憶體管理
/*****************************************************************
Name :
Date : 2018/01/09
By : CharlotteHonG
Final: 2018/01/09
*****************************************************************/
#pragma once
#include "cuda_runtime.h"
#include "device_launch_parameters.h"
@hunandy14
hunandy14 / BMP_RW.c
Last active March 31, 2022 07:41
讀寫BMP檔案
/*****************************************************************
Name : 讀寫BMP檔案
Date : 2017/11/10
By : CharlotteHonG
Final: 2019/08/07
readME : http://bit.ly/2LTHGWN
site : https://charlottehong.blogspot.com/2017/06/c-raw-bmp.html
*****************************************************************/
#include <stdlib.h>
@hunandy14
hunandy14 / draw_arrow.cpp
Last active November 11, 2017 03:06
畫箭頭
/*****************************************************************
Name : 畫箭頭
Date : 2017/11/09
By : CharlotteHonG
Final: 2017/11/11
*****************************************************************/
#include <iostream>
#include <fstream>
#include <vector>
#include <cmath>
/*****************************************************************
Name :
Date : 2017/10/23
By : CharlotteHonG
Final: 2017/10/23
*****************************************************************/
#include <iostream>
#include <fstream>
#include <string>
#include <cstring>
@hunandy14
hunandy14 / Ard.c
Created August 24, 2017 09:48
STM32F469I Arduino D0~D15 Define and Use
/*----------------------------------------------------------------
Arduino背板初始化設定函式
----------------------------------------------------------------*/
/* 腳位定義 */
#define ArD0_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
#define ArD1_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
#define ArD2_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
#define ArD3_GPIO_PORT ((GPIO_TypeDef*)GPIOA)
#define ArD4_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
#define ArD5_GPIO_PORT ((GPIO_TypeDef*)GPIOA)
@hunandy14
hunandy14 / ArduinoPinDefine.h
Created August 24, 2017 08:14
STM32F469I ArduinoPin Define
/*
Arduino D0~D15 腳位定義
*/
#define ArD0_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
#define ArD1_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
#define ArD2_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
#define ArD3_GPIO_PORT ((GPIO_TypeDef*)GPIOA)
#define ArD4_GPIO_PORT ((GPIO_TypeDef*)GPIOG)
#define ArD5_GPIO_PORT ((GPIO_TypeDef*)GPIOA)
#define ArD6_GPIO_PORT ((GPIO_TypeDef*)GPIOA)
@hunandy14
hunandy14 / ArduinoPinInit.c
Created August 24, 2017 07:08
STM32F469I ArduinoPin inti 初始化手動定義
void ArduinoPinInit()
{
/*
Arduino pin init : D0~D15
*/
// D15 - (B8)
port = GPIOB, pin = GPIO_PIN_8;
__HAL_RCC_GPIOB_CLK_ENABLE();
GPIO_InitStruct.Pin = pin;
HAL_GPIO_Init(port, &GPIO_InitStruct);
@hunandy14
hunandy14 / Raw_to_binh.cpp
Created August 10, 2017 12:07
STM32 RAW檔轉換至H檔案
/*****************************************************************
Name :
Date : 2017/08/09
By : CharlotteHonG
Final: 2017/08/09
*****************************************************************/
#include <iostream>
#include <fstream>
#include <sstream>
#include <algorithm>
@hunandy14
hunandy14 / bin_median.cpp
Created June 15, 2017 04:21
利用二進位找中值
/*****************************************************************
Name : 利用二進位找中值
Date : 2017/02/24
By : CharlotteHonG
Final: 2017/02/24
*****************************************************************/
#include <iostream>
#include <vector>
#include <iomanip>
#include <bitset>
@hunandy14
hunandy14 / read.cpp
Last active June 7, 2017 17:29
特定格式讀取檔案
/*****************************************************************
Name : 讀取特定格式文件
Date : 2017/06/06
By : CharlotteHonG
Final: 2017/06/06
*****************************************************************/
#include <iostream>
#include <fstream>
#include <string>
#include <vector>