50 lines
1.4 KiB
C
50 lines
1.4 KiB
C
/**
|
|
*********************************************************************
|
|
*
|
|
* @file testmode.h
|
|
* @brief
|
|
*
|
|
* @date 2024-04-14 16:11:04
|
|
* @author CT
|
|
*
|
|
* @details Provides control of GPIO and communication bus's to evaluate board design
|
|
* Commands available:
|
|
* Enable/Disable PWR_HOLDUP output
|
|
* Enable/Disable SD_PWR_EN output
|
|
* Enable/Disable Radio_Wake output
|
|
* Enable/Disable LED output
|
|
* Enable/Disable RAM_CE output
|
|
* Enable/Disable SD_CE output
|
|
* Read BAT_V analog counts
|
|
* Read temperature from SHT40
|
|
* Read relative humidity from SHT40
|
|
* Write arbitrary byte to external RAM
|
|
* Read arbitrary address from external RAM
|
|
*
|
|
*************************************************************************
|
|
**/
|
|
|
|
#ifndef _TEST_MODE_H_
|
|
#define _TEST_MODE_H_
|
|
|
|
// Commands
|
|
#define TESTMODE_READ ('R')
|
|
#define TESTMODE_WRITE ('W')
|
|
|
|
// Flags
|
|
#define TESTMODE_GPIO_LOW ('0')
|
|
#define TESTMODE_GPIO_HIGH ('1')
|
|
|
|
// GPIO
|
|
#define TESTMODE_PWR_HOLDEUP ('0')
|
|
#define TESTMODE_SD_PWR_EN ('1')
|
|
#define TESTMODE_RADIO_WAKE ('2')
|
|
#define TESTMODE_LED ('3')
|
|
#define TESTMODE_RAM_CE ('4')
|
|
#define TESTMODE_SD_CE ('5')
|
|
#define TESTMODE_BAT_V ('6')
|
|
|
|
void command_parser(char* input, uint32_t len);
|
|
|
|
|
|
#endif // _TEST_MODE_H_
|