summaryrefslogtreecommitdiff
path: root/wiki/Salvator-X_MAXIM_camera_board/GSML-Control.ino
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-12-05 17:35:40 +0900
committerKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-12-09 11:46:03 +0900
commit0e685e6f99571e82dc9f7d245e84b9ede4b0cb84 (patch)
treeff749845c0ebda1c70f3346be81e50977478e1f1 /wiki/Salvator-X_MAXIM_camera_board/GSML-Control.ino
parentfad61965b2d81b92e53f1c7182e2734c02dfb044 (diff)
wiki: Porting MAXIM camera board
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Diffstat (limited to 'wiki/Salvator-X_MAXIM_camera_board/GSML-Control.ino')
-rw-r--r--wiki/Salvator-X_MAXIM_camera_board/GSML-Control.ino48
1 files changed, 48 insertions, 0 deletions
diff --git a/wiki/Salvator-X_MAXIM_camera_board/GSML-Control.ino b/wiki/Salvator-X_MAXIM_camera_board/GSML-Control.ino
new file mode 100644
index 0000000..1837025
--- /dev/null
+++ b/wiki/Salvator-X_MAXIM_camera_board/GSML-Control.ino
@@ -0,0 +1,48 @@
+
+
+// GMSL Configuration
+const int MAX16951_EN = 6;
+
+void set_EN(int onoff)
+{
+ digitalWrite(MAX16951_EN, onoff);
+
+ if (onoff)
+ Serial.print("Pin High\n");
+ else
+ Serial.print("Pin Low\n");
+}
+
+void setup() {
+ pinMode(MAX16951_EN, OUTPUT);
+ set_EN(LOW);
+
+ Serial.begin(115200);
+ Serial.print("\n");
+ //Serial.setDebugOutput(true);
+}
+
+void loop() {
+ int i;
+ // configure power-on state before delay
+
+ set_EN(LOW);
+
+ // blink a bit
+ for (i=0; i<10; i++) {
+ digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
+ delay(50); // wait for 50 ms
+ digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
+ delay(50); // wait for 50 ms
+ }
+
+ // configure final state after delay
+ set_EN(HIGH);
+
+ digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
+
+ while(1) {
+ delay(1000);
+ // Serial.print("Spinning\n");
+ }
+}