firmware/variants/tracker-t1000-e/variant.cpp
dylanli a000a8d347
Support Seeed Tracker-T1000-E (#4303)
* feature-T1000-E: add Added the board definition for T1000-E

-  integrate a script for rapid dependency download that is compatible with both Linux and Windows platforms.
-  add the pin definitions for UART, SPI, GPIO, and other peripherals have been ensured to be correct.
-  add the env configuration for PlatformIO.

* refact-T1000-E: redefine T1000-E board

* feature-T1000-E: add basic sensors

* feature-T1000-E: add button init

* feat: add DRADIOLIB_GODMODE defination for use function setDioAsRfSwitch to DIO LORA RF

* feat : add gps(GNSS_Airoha) sleep mode

* feat: add behavier when rec or send message

* chore: hang IIC bus usage to avoid sensor address conflict

* feat: add sensor data acquisition

* feat : support Airoha GPS

- add disable it in FSM
- update  lookForTime and lookForLocation function

* fix: fix a bug

* version: change version to 0.9.0

* Update tracker-t1000-e.json

Remove a space

* Delete variants/tracker-t1000-e/run_once.sh

Delete not need as we will change platformio.ini

* Update platformio.ini

Update SoftDevice 7.3.0 usage in line with other lr1110 targets

Do we need to keep GODMODE ?

* fix: Button behavier incorrect bug

* fix:remove some invaild code of TextMessageModule

* fix: remove invaild comment

* version: change version to 0.9.1

- update mark's patch
- remove some invaild code and comments
- fix button behavier

* trunk format

* fix:  HELTEC_CAPSULE_SENSOR_V3 block got accidentally deleted

* fix: EnvironmentTelemetry upstream merge went awry.

* fix: Added macro definitions to ensure correct operation of LORA section

* fix :GNSS_AIROHA macro defination in line with others

* fix: upstream backmerge accidentally.

* fix: wrap macro PIN_3V3_EN BUZZER_EN_PIN GNSS_AIROHA in the TRACKER_T1000_E macro guard

---------

Co-authored-by: Mark Trevor Birss <markbirss@gmail.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
Co-authored-by: Thomas Göttgens <tgoettgens@gmail.com>
2024-07-24 21:10:38 -05:00

64 lines
1.9 KiB
C++

/*
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
Copyright (c) 2016 Sandeep Mistry All right reserved.
Copyright (c) 2018, Adafruit Industries (adafruit.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "variant.h"
#include "nrf.h"
#include "wiring_constants.h"
#include "wiring_digital.h"
const uint32_t g_ADigitalPinMap[] = {
// P0
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
// P1
32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47};
void initVariant()
{
// LED1 & LED2
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, LOW);
pinMode(PIN_3V3_EN, OUTPUT);
digitalWrite(PIN_3V3_EN, HIGH);
pinMode(PIN_3V3_ACC_EN, OUTPUT);
digitalWrite(PIN_3V3_ACC_EN, LOW);
pinMode(BUZZER_EN_PIN, OUTPUT);
digitalWrite(BUZZER_EN_PIN, HIGH);
pinMode(PIN_GPS_EN, OUTPUT);
digitalWrite(PIN_GPS_EN, LOW);
pinMode(GPS_VRTC_EN, OUTPUT);
digitalWrite(GPS_VRTC_EN, HIGH);
pinMode(PIN_GPS_RESET, OUTPUT);
digitalWrite(PIN_GPS_RESET, LOW);
pinMode(GPS_SLEEP_INT, OUTPUT);
digitalWrite(GPS_SLEEP_INT, HIGH);
pinMode(GPS_RTC_INT, OUTPUT);
digitalWrite(GPS_RTC_INT, LOW);
pinMode(GPS_RESETB_OUT, INPUT);
}