Compare commits
No commits in common. "cd0cfa1d404b025d96923a8fc229df08b7bbc24a" and "3d0a13deade9ea5a59e1d4ea0f8b61144859ca3e" have entirely different histories.
cd0cfa1d40
...
3d0a13dead
|
@ -159,5 +159,9 @@
|
|||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
<storageModule moduleId="refreshScope"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||
<configuration configurationName="build_softi2c">
|
||||
<resource resourceType="PROJECT" workspacePath="/nametag8_CH592"/>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
</cproject>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="498546753104804359" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-83964059827239915" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
|
|
@ -290,7 +290,7 @@ void rgb_waving(uint8_t *a, uint16_t tick)
|
|||
uint8_t desatfade = a[1] & 0x20;
|
||||
|
||||
rgb_waving_divider++;
|
||||
rgb_waving_divider %= RGBLED_COUNT;
|
||||
rgb_waving_divider %= 10;
|
||||
if (!rgb_waving_divider && (a[1] & 0x02)) {
|
||||
for (i = 0; i < RGBLED_COUNT; i++) {
|
||||
if (hsv_out[i].v <= trailfade) {
|
||||
|
@ -342,16 +342,16 @@ void rgb_waving(uint8_t *a, uint16_t tick)
|
|||
break;
|
||||
}
|
||||
case 1: { // moving down
|
||||
hsv_out[rgb_map[ a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[ a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[ a[6]]].v = uconf.favcolor_val;
|
||||
hsv_out[rgb_map[ a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[ a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[ a[6]]].v = uconf.favcolor_val;
|
||||
|
||||
hsv_out[rgb_map[RGBLED_COUNT - 1 - a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[RGBLED_COUNT - 1 - a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[RGBLED_COUNT - 1 - a[6]]].v = uconf.favcolor_val;
|
||||
hsv_out[rgb_map[9 - a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[9 - a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[9 - a[6]]].v = uconf.favcolor_val;
|
||||
|
||||
a[6]++;
|
||||
if (a[6] >= (RGBLED_COUNT >> 1) - 1) {
|
||||
if (a[6] >= 5) {
|
||||
a[5] = stall;
|
||||
a[4]++;
|
||||
break;
|
||||
|
@ -360,16 +360,16 @@ void rgb_waving(uint8_t *a, uint16_t tick)
|
|||
break;
|
||||
}
|
||||
case 3: { // moving up
|
||||
hsv_out[rgb_map[(RGBLED_COUNT >> 1) + 0 - a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[(RGBLED_COUNT >> 1) + 0 - a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[(RGBLED_COUNT >> 1) + 0 - a[6]]].v = uconf.favcolor_val;
|
||||
hsv_out[rgb_map[4 - a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[4 - a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[4 - a[6]]].v = uconf.favcolor_val;
|
||||
|
||||
hsv_out[rgb_map[(RGBLED_COUNT >> 1) + 1 + a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[(RGBLED_COUNT >> 1) + 1 + a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[(RGBLED_COUNT >> 1) + 1 + a[6]]].v = uconf.favcolor_val;
|
||||
hsv_out[rgb_map[5 + a[6]]].h = uconf.favcolor_hue * 6;
|
||||
hsv_out[rgb_map[5 + a[6]]].s = uconf.favcolor_sat;
|
||||
hsv_out[rgb_map[5 + a[6]]].v = uconf.favcolor_val;
|
||||
|
||||
a[6]++;
|
||||
if (a[6] >= (RGBLED_COUNT >> 1) - 1) {
|
||||
if (a[6] >= 5) {
|
||||
a[5] = stall;
|
||||
a[4]++;
|
||||
break;
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
*
|
||||
* todo:
|
||||
* - decouple oled render routine from interrupt off time. not an issue for now...
|
||||
* - shrink main tick interrupt routine to incrementing a flag
|
||||
* - implement better CPU usage statistics
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -58,7 +60,7 @@
|
|||
|
||||
#define PROG_TICK_RATE ((32768-8192-4096) / 256) // not sure why this value can't be 32768/256
|
||||
// this was checked with a stopwatch and is close enough
|
||||
// this value IS FRAMERATE DEPENDENT for some reason... figure it out later
|
||||
// this value IS FRAMERATE DEPENDENT... todo: fix this and make this accurate
|
||||
#define IDLE_SLEEP_START (1 << 0)
|
||||
#define IDLE_MENU_START (1 << 1)
|
||||
#define IDLE_DIM_START (1 << 2)
|
||||
|
@ -68,7 +70,7 @@
|
|||
|
||||
|
||||
|
||||
const uint8_t vers[] = "241116a";
|
||||
const uint8_t vers[] = "241109a";
|
||||
|
||||
uint32_t cpu_use = 0;
|
||||
uint32_t cpu_max = 0;
|
||||
|
|
|
@ -22,8 +22,8 @@ uint16_t uconf_flash_offset;
|
|||
|
||||
static const uint8_t uconf_edge_defaults[8][8] = {
|
||||
{0x03, 0x10, 0x04, 0x00, 0x00, 0x00, 0xff, 0xa0}, // solid color
|
||||
{0x03, 0x1f, 0x04, 0x00, 0x00, 0x00, 0xff, 0xa0}, // flicker
|
||||
{0x15, 0x42, 0x0b, 0x00, 0xa0, 0x30, 0xff, 0x20}, // circles
|
||||
{0x03, 0x10, 0x04, 0x00, 0x00, 0x00, 0xff, 0xa0}, // flicker
|
||||
{0x15, 0x42, 0x50, 0x00, 0xa0, 0x30, 0xff, 0x20}, // circles
|
||||
{0x03, 0x10, 0x04, 0x00, 0x00, 0x00, 0xff, 0xa0}, // waving
|
||||
{0x03, 0x11, 0x05, 0x00, 0x00, 0x00, 0xff, 0x80}, // rainbow
|
||||
{0x00, 0x01, 0x01, 0x00, 0x00, 0x66, 0x46, 0x80}, // cop mode
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.include.paths.1567947810" name="Include paths (-I)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Debug}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Core}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/user}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/User}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/Peripheral/inc}""/>
|
||||
</option>
|
||||
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.std.2020844713" name="Language standard" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.std" useByScannerDiscovery="true" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.std.gnu99" valueType="enumerated"/>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
|
||||
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="472368321955700908" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-16790866626903596" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD "${INPUTS}"" prefer-non-shared="true">
|
||||
<language-scope id="org.eclipse.cdt.core.gcc"/>
|
||||
<language-scope id="org.eclipse.cdt.core.g++"/>
|
||||
</provider>
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
#include <ch32v00x_misc.h>
|
||||
#include <ch32v00x_pwr.h>
|
||||
#include <ch32v00x_rcc.h>
|
||||
//#include <ch32v00x_spi.h>
|
||||
#include <ch32v00x_spi.h>
|
||||
#include <ch32v00x_tim.h>
|
||||
#include <ch32v00x_usart.h>
|
||||
#include <ch32v00x_wwdg.h>
|
||||
//#include <ch32v00x_opa.h>
|
||||
#include <ch32v00x_opa.h>
|
||||
|
||||
#include "ch32v00x_it.h"
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "irda.h"
|
||||
|
||||
#include "intr_out.h"
|
||||
#include "i2c_slave.h"
|
||||
#include "../i2c_slave.h"
|
||||
|
||||
|
||||
|
||||
|
@ -106,7 +106,6 @@ void irda_ena_rx()
|
|||
USART1->CTLR2 &= ~USART_CTLR1_TE;
|
||||
USART1->CTLR2 |= USART_CTLR1_RE;
|
||||
|
||||
USART_ClearITPendingBit(USART1, USART_IT_RXNE);
|
||||
USART_ITConfig(USART1, USART_IT_RXNE, ENABLE);
|
||||
}
|
||||
|
||||
|
@ -256,7 +255,6 @@ void irda_process()
|
|||
}
|
||||
|
||||
irda_timeout--;
|
||||
i2cs_reg[REG_IRDA_TIMER] = irda_timeout;
|
||||
|
||||
switch (irda_state) {
|
||||
case IRDA_STATE_TX_HEADER:
|
||||
|
|
|
@ -25,8 +25,8 @@ enum {
|
|||
|
||||
|
||||
|
||||
#define IRDA_HEADER_01 0x5a
|
||||
#define IRDA_HEADER_02 0xa5
|
||||
#define IRDA_HEADER_01 0x5a
|
||||
#define IRDA_HEADER_02 0xa5
|
||||
|
||||
|
||||
#define IRDA_SD_PORT GPIOA
|
||||
|
|
Loading…
Reference in New Issue