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.
Dependents: NucleoMGC3130 i2c_master
Trigger.h
00001 #ifndef UK_AC_HERTS_SMARTLAB_MGC3130_Trigger 00002 #define UK_AC_HERTS_SMARTLAB_MGC3130_Trigger 00003 00004 #include "Parameter.h" 00005 00006 class Trigger: public Parameter 00007 { 00008 public: 00009 /// The default setting will be force re-calibration. 00010 Trigger() { 00011 setRuntimeParameterID(0x1000); 00012 } 00013 00014 /// Force re-calibration. 00015 void ForceRecalibration() { 00016 setArgument0(0x00); 00017 } 00018 00019 /** 00020 *Enter Deep Sleep 1: The wake-up sources from 00021 *Deep Sleep 1 are I2C0 Start bit detection or 00022 *MCLR Reset. 00023 *The system will resume from Deep Sleep on any 00024 *I2C messages sent on the bus, and the first I2C 00025 *message will be lost. 00026 */ 00027 void EnterDeepSleep1() { 00028 setArgument0(0x00000002); 00029 } 00030 00031 /** 00032 *Enter Deep Sleep 2: The wake-up source from 00033 *Deep Sleep 2 is a falling edge on External Interrupt 00034 *(IRQ0) or MCLR Reset. 00035 *The IRQ0 (EIO2) should be tied to High when this 00036 *command is sent unless the MGC3X30 resumes 00037 *directly after receiving it. 00038 */ 00039 void EnterDeepSleep2() { 00040 setArgument0(0x00000003); 00041 } 00042 }; 00043 00044 #endif
Generated on Fri Jul 15 2022 02:54:57 by
1.7.2