From 79912435545e69044f84c02ae71298a4216c3183 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Wed, 29 Aug 2018 20:44:56 +0200 Subject: [PATCH] Remove CGo from machine module It isn't necessary anymore but apparently the Go importer didn't complain about an unused import. --- src/machine/machine_nrf.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/machine/machine_nrf.go b/src/machine/machine_nrf.go index d1197f5e..b73a1a21 100644 --- a/src/machine/machine_nrf.go +++ b/src/machine/machine_nrf.go @@ -2,9 +2,6 @@ package machine -// #include "../runtime/runtime_nrf.h" -import "C" - import ( "device/nrf" ) @@ -26,7 +23,6 @@ const ( ) func (p GPIO) Configure(config GPIOConfig) { - //C.gpio_cfg(C.uint(p.Pin), C.gpio_mode_t(config.Mode)) cfg := config.Mode | nrf.P0_PIN_CNF_PULL_Disabled | nrf.P0_PIN_CNF_DRIVE_S0S1 | nrf.P0_PIN_CNF_SENSE_Disabled if config.Mode == GPIO_INPUT { cfg |= nrf.P0_PIN_CNF_INPUT_Connect @@ -37,7 +33,6 @@ func (p GPIO) Configure(config GPIOConfig) { } func (p GPIO) Set(high bool) { - //C.gpio_set(C.uint(p.Pin), C.bool(value)) // TODO: compiler limitation: both operands must be the same LLVM type if high { nrf.P0.OUTSET = 1 << uint32(p.Pin)