pwm period is now 200us instead of the default 20ms veml6040 config is now AF_BIT | TRIG_BIT

Dependencies:   mbed MMA8451Q USBDevice WakeUp vt100

Fork of afero_node_suntory_2017_06_15 by Orefatoi

Revision:
1:b2a9a6f2c30e
Parent:
0:20bce0dcc921
Child:
21:d03c7bbb9f37
--- a/spi/mbedSPI.cpp	Tue Dec 20 01:51:02 2016 +0000
+++ b/spi/mbedSPI.cpp	Thu Jan 19 09:17:16 2017 +0000
@@ -1,10 +1,19 @@
 #include "mbedSPI.h"
 #include "BitOrder.h"
 
-mbedSPI::mbedSPI() : spi(SPI_MOSI,SPI_MISO,SPI_SCLK), cs(SPI_CS_ASR_1,SPI_CS_DEASSERT)
+using namespace MaruSolSensorManager;
+
+mbedSPI::mbedSPI() :
+    spi((PinName)PINS::ASR_1::SPI::MOSI,
+        (PinName)PINS::ASR_1::SPI::MISO,
+        (PinName)PINS::ASR_1::SPI::SCK),
+    cs((PinName)PINS::ASR_1::SPI::CS,
+        PINS::ASR_1::SPI::SIG::CS::DEASSERT)
 {
-    spi.format(SPI_NUM_BITS_PER_FRAME, SPI_MODE_0);
-    spi.frequency(SPI_FREQ);
+    spi.format(
+        PINS::ASR_1::SPI::NUM_BITS_PER_FRAME, //SPI_NUM_BITS_PER_FRAME,
+        PINS::ASR_1::SPI::MODE_0);
+    spi.frequency(PINS::ASR_1::SPI::FREQUENCY);
 #if defined (TARGET_KL25Z)
     #ifndef SPI0_C1
         #define SPI0_C1 (*(uint8_t *)0x40076000)
@@ -23,13 +32,13 @@
 
 void mbedSPI::beginSPI() /* settings are in this class */
 {
-    cs = SPI_CS_ASSERT;
+    cs = PINS::ASR_1::SPI::SIG::CS::ASSERT;
     wait_us(1);
 }
 
 void mbedSPI::endSPI()
 {
-    cs = SPI_CS_DEASSERT;
+    cs = PINS::ASR_1::SPI::SIG::CS::DEASSERT;
 }
 
 void mbedSPI::transfer(char *bytes,int len)