Skip to content

Instantly share code, notes, and snippets.

#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);
<item name="Tool.CMSIS_Config_Wizard" wait="no">
<menu>&amp;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 &quot;$(CMSIS_CONFIG_TOOL)&quot; &quot;$(InputPath)&quot;
</commands>
#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)
#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)
from ctypes import *
from enum import IntEnum
########## start. enum , struct
class CyMAXNM_ARRVALUE_CySTCM(IntEnum):
value = 10
from ctypes import *
from enum import IntEnum
########## start. enum , struct
class CyMAXNM_ARRVALUE_CySTCM(IntEnum):
value = 10
//+------------------------------------------------------------------+
//| CyNewBar.mqh |
//| igotit |
//| http://igotit.tistory.com |
//+------------------------------------------------------------------+
#property copyright "igotit"
#property link "http://igotit.tistory.com"
#property version "1.00"
//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//| CyClosePositionAllSymbol.mq5 |
//| igotit |
//| http://igotit.tistory.com |
//+------------------------------------------------------------------+
#property copyright "igotit"
#property link "http://igotit.tistory.com"
#property version "1.00"
#include <Trade\Trade.mqh>
@igotit-anything
igotit-anything / MQL5_GetFinCnadle.py
Created April 21, 2019 13:38
Oython easy get financial data from MetaTrader5
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
#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"