summaryrefslogtreecommitdiff
path: root/analog/motor-power-avr/src/mp_pwm_LR_.h
diff options
context:
space:
mode:
authorPierre Prot2008-02-07 00:08:33 +0100
committerPierre Prot2008-02-07 00:08:33 +0100
commit2dbdc0c21a686d55247d893988081eaac8044112 (patch)
tree4a9370a8a2882765e138655b9d9d2ca4452a9cdb /analog/motor-power-avr/src/mp_pwm_LR_.h
parent9344f6ab5e9f7e80f26791a2bb534c6c8c1a9143 (diff)
Pas mal de modifs en général
- ADC - cleanup - cleanup - cleanup - ça compile pas encore
Diffstat (limited to 'analog/motor-power-avr/src/mp_pwm_LR_.h')
-rw-r--r--analog/motor-power-avr/src/mp_pwm_LR_.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/analog/motor-power-avr/src/mp_pwm_LR_.h b/analog/motor-power-avr/src/mp_pwm_LR_.h
new file mode 100644
index 00000000..3aaf3672
--- /dev/null
+++ b/analog/motor-power-avr/src/mp_pwm_LR_.h
@@ -0,0 +1,49 @@
+#ifndef mp_pwm_LR__h
+#define mp_pwm_LR__h
+/* mp_pwm_LR_.h */
+/* {{{
+ *
+ * Copyright (C) 2008 Pierre Prot
+ *
+ * APBTeam:
+ * Web: http://apbteam.org/
+ * Email: team AT apbteam DOT org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * }}} */
+
+#include "common.h"
+
+#define OCR_L_ OCR0
+#define OCR_R_ OCR2
+
+#define Timer_L_ TOCNT
+#define Timer_R_ T2CNT
+
+#define PWM_MIN_LR_ 0x10
+#define PWM_MAX_LR_ 0xF0
+#define PWM_OFFSET_LR_ 0x00
+
+void init_timer_LR_(void);
+void init_curLim (void);
+uint8_t get_curLim_temp (uint8_t temperature);
+uint8_t get_curLim_bat (uint8_t battery);
+void update_curLim(void);
+void launch_envTest(void);
+void setCurLim_soft(uint8_t curLim);
+
+
+#endif /* mp_pwm_LR__h */