Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • add_menu_vibration
  • blinkisync-as-preload
  • ch3/api-speed-eval2
  • ch3/dual-core
  • ch3/genapi-refactor
  • ch3/leds-api
  • ch3/splashscreen
  • dualcore
  • freertos-btle
  • genofire/ble-follow-py
  • koalo/bhi160-works-but-dirty
  • koalo/factory-reset
  • koalo/wip/i2c-for-python
  • master
  • msgctl/faultscreen
  • msgctl/gfx_rle
  • msgctl/textbuffer_api
  • plaetzchen/ios-workaround
  • rahix/bhi
  • rahix/bma
  • renze/hatchery_apps
  • renze/safe_mode
  • schleicher-test
  • schneider/ble-buffers
  • schneider/bonding
  • schneider/bootloader-update-9a0d158
  • schneider/bsec
  • schneider/fundamental-test
  • schneider/max30001
  • schneider/max30001-epicaridum
  • schneider/max30001-pycardium
  • schneider/maxim-sdk-update
  • schneider/mp-for-old-bl
  • schneider/schleicher-test
  • schneider/standby
  • schneider/stream-locks
  • bootloader-v1
  • release-1
  • v0.0
  • v1.0
  • v1.1
  • v1.10
  • v1.2
  • v1.3
  • v1.4
  • v1.5
  • v1.6
  • v1.7
  • v1.8
  • v1.9
50 results

Target

Select target project
  • card10/firmware
  • annejan/firmware
  • astro/firmware
  • fpletz/firmware
  • gerd/firmware
  • fleur/firmware
  • swym/firmware
  • l/firmware
  • uberardy/firmware
  • wink/firmware
  • madonius/firmware
  • mot/firmware
  • filid/firmware
  • q3k/firmware
  • hauke/firmware
  • Woazboat/firmware
  • pink/firmware
  • mossmann/firmware
  • omniskop/firmware
  • zenox/firmware
  • trilader/firmware
  • Danukeru/firmware
  • shoragan/firmware
  • zlatko/firmware
  • sistason/firmware
  • datenwolf/firmware
  • bene/firmware
  • amedee/firmware
  • martinling/firmware
  • griffon/firmware
  • chris007/firmware
  • adisbladis/firmware
  • dbrgn/firmware
  • jelly/firmware
  • rnestler/firmware
  • mh/firmware
  • ln/firmware
  • penguineer/firmware
  • monkeydom/firmware
  • jens/firmware
  • jnaulty/firmware
  • jeffmakes/firmware
  • marekventur/firmware
  • pete/firmware
  • h2obrain/firmware
  • DooMMasteR/firmware
  • jackie/firmware
  • prof_r/firmware
  • Draradech/firmware
  • Kartoffel/firmware
  • hinerk/firmware
  • abbradar/firmware
  • JustTB/firmware
  • LuKaRo/firmware
  • iggy/firmware
  • ente/firmware
  • flgr/firmware
  • Lorphos/firmware
  • matejo/firmware
  • ceddral7/firmware
  • danb/firmware
  • joshi/firmware
  • melle/firmware
  • fitch/firmware
  • deurknop/firmware
  • sargon/firmware
  • markus/firmware
  • kloenk/firmware
  • lucaswerkmeister/firmware
  • derf/firmware
  • meh/firmware
  • dx/card10-firmware
  • torben/firmware
  • yuvadm/firmware
  • AndyBS/firmware
  • klausdieter1/firmware
  • katzenparadoxon/firmware
  • xiretza/firmware
  • ole/firmware
  • techy/firmware
  • thor77/firmware
  • TilCreator/firmware
  • fuchsi/firmware
  • dos/firmware
  • yrlf/firmware
  • PetePriority/firmware
  • SuperVirus/firmware
  • sur5r/firmware
  • tazz/firmware
  • Alienmaster/firmware
  • flo_h/firmware
  • baldo/firmware
  • mmu_man/firmware
  • Foaly/firmware
  • sodoku/firmware
  • Guinness/firmware
  • ssp/firmware
  • led02/firmware
  • Stormwind/firmware
  • arist/firmware
  • coon/firmware
  • mdik/firmware
  • pippin/firmware
  • royrobotiks/firmware
  • zigot83/firmware
  • mo_k/firmware
106 results
Select Git revision
  • add_menu_vibration
  • blinkisync-as-preload
  • ch3/api-speed-eval2
  • ch3/dual-core
  • ch3/genapi-refactor
  • ch3/leds-api
  • ch3/splashscreen
  • dualcore
  • dx/flatten-config-module
  • dx/meh-bdf-to-stm
  • freertos-btle
  • genofire/ble-follow-py
  • koalo/bhi160-works-but-dirty
  • koalo/factory-reset
  • koalo/wip/i2c-for-python
  • master
  • msgctl/faultscreen
  • msgctl/textbuffer_api
  • plaetzchen/ios-workaround
  • rahix/bhi
  • rahix/bluetooth-app-favorite
  • rahix/bma
  • rahix/user-space-ctx
  • renze/hatchery_apps
  • renze/safe_mode
  • schleicher-test
  • schneider/212-reset-hardware-when-entering-repl
  • schneider/ancs
  • schneider/ble-buffers
  • schneider/ble-central
  • schneider/ble-ecg-stream-visu
  • schneider/ble-fixes-2020-3
  • schneider/ble-mini-demo
  • schneider/ble-stability
  • schneider/ble-stability-new-phy
  • schneider/bonding
  • schneider/bonding-fail-if-full
  • schneider/bootloader-update-9a0d158
  • schneider/deepsleep
  • schneider/deepsleep2
  • schneider/deepsleep4
  • schneider/default-main
  • schneider/freertos-list-debug
  • schneider/fundamental-test
  • schneider/iaq-python
  • schneider/ir
  • schneider/max30001
  • schneider/max30001-epicaridum
  • schneider/max30001-pycardium
  • schneider/maxim-sdk-update
  • schneider/mp-exception-print
  • schneider/mp-for-old-bl
  • schneider/png
  • schneider/schleicher-test
  • schneider/sdk-0.2.1-11
  • schneider/sdk-0.2.1-7
  • schneider/sleep-display
  • schneider/spo2-playground
  • schneider/stream-locks
  • schneider/v1.17-changelog
  • bootloader-v1
  • release-1
  • v0.0
  • v1.0
  • v1.1
  • v1.10
  • v1.11
  • v1.12
  • v1.13
  • v1.14
  • v1.15
  • v1.16
  • v1.17
  • v1.18
  • v1.2
  • v1.3
  • v1.4
  • v1.5
  • v1.6
  • v1.7
  • v1.8
  • v1.9
82 results
Show changes
Commits on Source (1)
......@@ -80,6 +80,11 @@ The current draft uses following service specification:
UUID: ``42230220-2342-2342-2342-234223422342``
read and write no reponse
- LCD brightness characteristic:
UUID: ``42230221-2342-2342-2342-234223422342``
write no reponse
- Light sensor characteristic:
UUID: ``422302f0-2342-2342-2342-234223422342``
......@@ -178,6 +183,13 @@ By defining 11x rgb from left to right. You need also to set exchange a bigger M
- set a rainbow beginnig with red on the right edge: ``0xff0000ff8b00e8ff005dff0000ff2e00ffb900b9ff002eff5d00ffe800ffff008b``
LCD brightness characteristic
---------------------------------
This charatieristic set the brightness of the lcd backlight 0-100 in ``uint16``.
- set to 100 % ``0x6400``
- set to 20 % ``0x1400`` (default value)
Light sensor characteristic
---------------------------------
......
......@@ -65,6 +65,9 @@ enum {
/*!< \brief leds above characteristic */
CARD10_LEDS_ABOVE_CH_HDL,
CARD10_LEDS_ABOVE_VAL_HDL,
/*!< \brief lcd birhtness characteristic */
CARD10_LCD_BRIGHTNESS_CH_HDL,
CARD10_LCD_BRIGHTNESS_VAL_HDL,
/*!< \brief light sensor characteristic */
CARD10_LIGHT_SENSOR_CH_HDL,
CARD10_LIGHT_SENSOR_VAL_HDL,
......@@ -263,6 +266,17 @@ static uint8_t aboveLEDsValue[] = {
};
static uint16_t aboveLEDsLen = sizeof(aboveLEDsValue);
/* BLE UUID for card10 set lcd brightness */
static const uint8_t UUID_char_lcd_brightness[] = {
ATT_PROP_WRITE_NO_RSP,
UINT16_TO_BYTES(CARD10_LCD_BRIGHTNESS_VAL_HDL),
CARD10_UUID_SUFFIX, 0x21, CARD10_UUID_PREFIX
};
static const uint8_t UUID_attChar_lcd_brightness[] = {
CARD10_UUID_SUFFIX, 0x21, CARD10_UUID_PREFIX
};
// starting at 0xf0 with read only characteristics
/* BLE UUID for card10 char light sensor */
......@@ -543,6 +557,24 @@ static const attsAttr_t card10SvcAttrList[] = {
ATTS_PERMIT_READ_ENC | ATTS_PERMIT_READ_AUTH,
},
// LCD Brightness
{
.pUuid = attChUuid,
.pValue = (uint8_t *)UUID_char_lcd_brightness,
.pLen = (uint16_t *)&UUID_char_len,
.maxLen = sizeof(UUID_char_lcd_brightness),
.permissions = ATTS_PERMIT_READ,
},
{
.pUuid = UUID_attChar_lcd_brightness,
.pValue = NULL,
.maxLen = sizeof(uint16_t),
.settings = ATTS_SET_WRITE_CBACK,
.permissions = ATTS_PERMIT_WRITE | ATTS_PERMIT_WRITE_ENC |
ATTS_PERMIT_WRITE_AUTH,
},
// Light sensor
{
......@@ -630,6 +662,7 @@ static uint8_t writeCard10CB(
) {
uint16_t ui16 = 0;
uint8_t ui8 = 0;
int intVar = 0;
switch (handle) {
// time
......@@ -791,6 +824,16 @@ static uint8_t writeCard10CB(
pValue[ui16 * 3 + 2]
);
}
return ATT_SUCCESS;
case CARD10_LCD_BRIGHTNESS_VAL_HDL:
BYTES_TO_UINT16(ui16, pValue);
intVar = epic_disp_backlight(ui16);
APP_TRACE_INFO2(
"ble-card10: set lcd brightness to %ld - %d\n",
ui16,
intVar
);
return ATT_SUCCESS;
default:
APP_TRACE_INFO1(
"ble-card10: unsupported characteristic: %c\n", handle
......