This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "pico/stdlib.h" | |
#include "st7789.h" | |
St7789::St7789( | |
uint8_t width, | |
uint8_t height, | |
uint16_t *frame_buffer, | |
spi_inst *spi, | |
int8_t pin_dc, | |
int8_t pin_reset, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2020 Google Inc. All Rights Reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2020 Google Inc. All Rights Reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <WebUSB.h> | |
WebUSB WebUSBSerial(1 /* https:// */, "rotavo-pwa.firebaseapp.com"); | |
#define Serial WebUSBSerial | |
// These constants won't change. They're used to give names to the pins used: | |
const int analogInPinA = A0; // Analog input pin that the potentiometer is attached to | |
const int analogInPinB = A2; // Analog input pin that the potentiometer is attached to |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.test.hellowebviewjava; | |
import android.os.Build; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.webkit.RenderProcessGoneDetail; | |
import android.webkit.WebView; | |
import android.webkit.WebViewClient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copy LauncherActivity from the support library repo | |
// (https://github.com/GoogleChrome/custom-tabs-client/blob/master/customtabs/src/android/support/customtabs/trusted/LauncherActivity.java#L153-L155) | |
// and replace the getCustomTabsIntent method, as below: | |
protected CustomTabsIntent getCustomTabsIntent(CustomTabsSession session) { | |
return new CustomTabsIntent.Builder(session) | |
.setToolbarColor(Color.parseColor("#000000")) | |
.build(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bundle headers = new Bundle(); | |
headers.putString("key", "value"); | |
customTabsIntent.intent.putExtra(Browser.EXTRA_HEADERS, headers); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Copyright 2017 The AMP HTML Authors. All Rights Reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int vertexShader = GL20.glCreateShader(GL20.GL_VERTEX_SHADER); | |
GL20.glShaderSource(vertexShader, vertexShaderSource); | |
GL20.glCompileShader(vertexShader); | |
String vertexShaderErrorLog = GL20.glGetShaderInfoLog(vertexShader, 65536); | |
if (vertexShaderErrorLog.length() != 0) { | |
System.err.println( | |
"Vertex shader compile log: \n" + vertexShaderErrorLog); | |
} |
NewerOlder