Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
PlatformGPIO.cpp
00001 // interface for SPI implemented with mbed framework 00002 00003 #include "PlatformGPIO.h" 00004 00005 00006 DigitalOut adc_SS(BOARD_ADS); 00007 DigitalOut adc_reset(ADS_RST); 00008 DigitalOut sd_SS(SD_SS); 00009 DigitalOut daisy_SS(DAISY_ADS); 00010 DigitalOut accel_SS(LIS3DH_SS); 00011 00012 InterruptIn adc_ready(ADS_DRDY); 00013 DigitalIn accel_ready(LIS3DH_DRDY); 00014 00015 void digitalWrite(int pin, unsigned char value) 00016 { 00017 if (pin == BOARD_ADS) 00018 adc_SS = value; 00019 else 00020 if (pin == ADS_RST) 00021 adc_reset = value; 00022 else 00023 if (pin == SD_SS) 00024 sd_SS = value; 00025 else 00026 if (pin == DAISY_ADS) 00027 daisy_SS = value; 00028 else 00029 if (pin == LIS3DH_SS) 00030 accel_SS = value; 00031 } 00032 00033 unsigned char digitalRead(int pin) 00034 { 00035 if (pin == ADS_DRDY) 00036 return adc_ready; 00037 else 00038 if (pin == LIS3DH_DRDY) 00039 return accel_ready; 00040 } 00041 00042 // external interrupt as ready signal 00043 extern void ADS_DRDY_Service(); 00044 00045 void setIntEnable(int x) 00046 { 00047 adc_ready.fall(&ADS_DRDY_Service); 00048 }
Generated on Wed Jul 20 2022 12:01:51 by
1.7.2