From 6913601f9bb9596c70591ea9bb3d0ae0b522a3ca Mon Sep 17 00:00:00 2001 From: Rambo Date: Tue, 9 Jan 2018 00:45:10 +0200 Subject: [PATCH 1/3] Added Disable_Current_Trip function allows the current trip intterupt to be disabled --- src/M2_12VIO.cpp | 10 ++++++++++ src/M2_12VIO.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/M2_12VIO.cpp b/src/M2_12VIO.cpp index d5d60c2..929a702 100644 --- a/src/M2_12VIO.cpp +++ b/src/M2_12VIO.cpp @@ -467,6 +467,16 @@ uint16_t M2_12VIO::Reset_Current_Limit(){ return(M2_12VIO::Enable_12VIO_Monitor(ON)); } +/** +* \brief +* Disable the Current Trip Intterupt, prevents the output from being disabled due to faults or transients +* WARNING, you will only have the (relatively) slow PTC fuse to protect your outputs +* \param NIL +* \return void +*/ +uint16_t M2_12VIO::Disable_Current_Trip(){ + detachInterrupt(digitalPinToInterrupt(Interupt_Over_Current)); +} /* *\brief diff --git a/src/M2_12VIO.h b/src/M2_12VIO.h index 82b72a3..500ee40 100644 --- a/src/M2_12VIO.h +++ b/src/M2_12VIO.h @@ -247,6 +247,7 @@ class M2_12VIO{ uint16_t Init_12VIO(); uint16_t Reset_Current_Limit(); + void Disable_Current_Trip(); uint16_t Sleep(uint8_t Sleep_Mode); uint32_t Load_Amps(); uint32_t Supply_Volts(); From 4d9b9f66212e97e0fa866372c62748fb5a8dbda3 Mon Sep 17 00:00:00 2001 From: Rambo Date: Tue, 9 Jan 2018 00:45:10 +0200 Subject: [PATCH 2/3] Added Disable_Current_Trip function allows the current trip intterupt to be disabled --- src/M2_12VIO.cpp | 10 ++++++++++ src/M2_12VIO.h | 1 + 2 files changed, 11 insertions(+) diff --git a/src/M2_12VIO.cpp b/src/M2_12VIO.cpp index d5d60c2..8cc04a9 100644 --- a/src/M2_12VIO.cpp +++ b/src/M2_12VIO.cpp @@ -467,6 +467,16 @@ uint16_t M2_12VIO::Reset_Current_Limit(){ return(M2_12VIO::Enable_12VIO_Monitor(ON)); } +/** +* \brief +* Disable the Current Trip Intterupt, prevents the output from being disabled due to faults or transients +* WARNING, you will only have the (relatively) slow PTC fuse to protect your outputs +* \param NIL +* \return void +*/ +void M2_12VIO::Disable_Current_Trip(){ + detachInterrupt(digitalPinToInterrupt(Interupt_Over_Current)); +} /* *\brief diff --git a/src/M2_12VIO.h b/src/M2_12VIO.h index 82b72a3..500ee40 100644 --- a/src/M2_12VIO.h +++ b/src/M2_12VIO.h @@ -247,6 +247,7 @@ class M2_12VIO{ uint16_t Init_12VIO(); uint16_t Reset_Current_Limit(); + void Disable_Current_Trip(); uint16_t Sleep(uint8_t Sleep_Mode); uint32_t Load_Amps(); uint32_t Supply_Volts(); From 565923b18a36a4c3f9d82eecb3fd36380ac0054a Mon Sep 17 00:00:00 2001 From: Rambo Date: Tue, 9 Jan 2018 00:53:04 +0200 Subject: [PATCH 3/3] Small Cleanup --- src/M2_12VIO.cpp | 2 +- src/keywords.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/M2_12VIO.cpp b/src/M2_12VIO.cpp index 8cc04a9..12d411a 100644 --- a/src/M2_12VIO.cpp +++ b/src/M2_12VIO.cpp @@ -469,7 +469,7 @@ uint16_t M2_12VIO::Reset_Current_Limit(){ /** * \brief -* Disable the Current Trip Intterupt, prevents the output from being disabled due to faults or transients +* Disable the Current Trip Interrupt, prevents the output from being disabled due to faults or transients * WARNING, you will only have the (relatively) slow PTC fuse to protect your outputs * \param NIL * \return void diff --git a/src/keywords.txt b/src/keywords.txt index 6a8889c..3b4900c 100644 --- a/src/keywords.txt +++ b/src/keywords.txt @@ -12,6 +12,7 @@ ####################################### Init_12VIO() KEYWORD2 Reset_Current_Limit() KEYWORD2 +Disable_Current_Trip() KEYWORD2 Load_Amps() KEYWORD2 Supply_Volts() KEYWORD2 Read_12VIO(IO_Pin) KEYWORD2