This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "nrf52840.h" | |
#include "nrf52840_bitfields.h" | |
#include "nrf_delay.h" // added 2019-10-05 . step by step 1. for time delay | |
#include "nrf_drv_gpiote.h" // added 2019-10-06. step by step 2. for GPIOTE | |
void in_pin_handler(nrf_drv_gpiote_pin_t pin, nrf_gpiote_polarity_t action) | |
{ | |
nrf_drv_gpiote_out_toggle(13); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<item name="Tool.CMSIS_Config_Wizard" wait="no"> | |
<menu>&CMSIS Configuration Wizard for nRF SDK</menu> | |
<text>CMSIS Configuration Wizard</text> | |
<tip>Open a configuration file in CMSIS Configuration Wizard</tip> | |
<key>Ctrl+Y</key> | |
<match>sdk_config.h</match> | |
<message>CMSIS Config for nRF SDK</message> | |
<commands> | |
java -jar "$(CMSIS_CONFIG_TOOL)" "$(InputPath)" | |
</commands> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "nrf52840.h" | |
#include "nrf52840_bitfields.h" | |
void init_gpio_p0_output(uint32_t pin_num) | |
{ | |
NRF_GPIO_Type * reg = ((NRF_GPIO_Type*)NRF_P0_BASE); | |
reg->PIN_CNF[pin_num] = ((uint32_t)GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "nrf52840.h" | |
#include "nrf52840_bitfields.h" | |
void init_gpio_p0_output(uint32_t pin_num) | |
{ | |
NRF_GPIO_Type * reg = ((NRF_GPIO_Type*)NRF_P0_BASE); | |
reg->PIN_CNF[pin_num] = ((uint32_t)GPIO_PIN_CNF_DIR_Output << GPIO_PIN_CNF_DIR_Pos) | |
|((uint32_t)GPIO_PIN_CNF_INPUT_Disconnect << GPIO_PIN_CNF_INPUT_Pos) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ctypes import * | |
from enum import IntEnum | |
########## start. enum , struct | |
class CyMAXNM_ARRVALUE_CySTCM(IntEnum): | |
value = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ctypes import * | |
from enum import IntEnum | |
########## start. enum , struct | |
class CyMAXNM_ARRVALUE_CySTCM(IntEnum): | |
value = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
//| CyNewBar.mqh | | |
//| igotit | | |
//| http://igotit.tistory.com | | |
//+------------------------------------------------------------------+ | |
#property copyright "igotit" | |
#property link "http://igotit.tistory.com" | |
#property version "1.00" | |
//+------------------------------------------------------------------+ | |
//| | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//+------------------------------------------------------------------+ | |
//| CyClosePositionAllSymbol.mq5 | | |
//| igotit | | |
//| http://igotit.tistory.com | | |
//+------------------------------------------------------------------+ | |
#property copyright "igotit" | |
#property link "http://igotit.tistory.com" | |
#property version "1.00" | |
#include <Trade\Trade.mqh> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from MetaTrader5 import * | |
import pandas as pd | |
pd.set_option('display.max_columns', 500) # number of columns to be displayed | |
pd.set_option('display.width', 1500) # max table width to display | |
import matplotlib.pyplot as plt | |
MT5Initialize() # connect to MT5 | |
MT5WaitForTerminal() # wait till MT5 ready | |
### get candle data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdbool.h> | |
#include <stdint.h> | |
#include <stddef.h> | |
#include <stdio.h> | |
#include "boards.h" | |
#include "radio_config.h" // for radio | |
#include "nrf_drv_clock.h" |