I want to read this characteristic value in C program. Can anyone please provide me the code snippet for the same?

Hi, in the below file (gattprofile.h) we have a characteristic?SIMPLEPROFILE_CHAR1, I want to get it's value, can anyone please provide code snippet how to do that.

image.png


熱門(mén)產(chǎn)品 : CH390:以太網(wǎng)控制器芯片

you are which county people?


from India


You can directly modify the peripheral.c code. This is roughly the eigenvalue that you want to get。

emobile_2022-12-12_10-22-40.png


Actually I want to modify the pin value of the board like this?GPIOA_ModeCfg(GPIO_Pin_12, GPIO_ModeOut_PP_5mA)?to light the led, which is the value I will be sending from external source (app), I am doing?this process with changing the characteristic values, because that is the only value we can read write from the app.


Also you mention the eigen value, let's say if the string message that I set in this attribute is?'h'.?How should I check this value in peripheral.c code? Like below ?


(SIMPLEPROFILE_CHAR1 == eigenValue('h'))




Do you want to send a value through an external APP to light up the LED? You can be direct about your problems and needs. It's better to know what you need, and I sent you a modified program earlier so you can see the values that you've written through the app. There is no need to modify the eigenvalues. You might want to comb through the code logic.


Yes, I want to send a value externally to light an LED, as below:


GPIOA_ModeCfg(GPIO_Pin_12, GPIO_ModeOut_PP_5mA); // PA12 - PWM4

GPIOA_ModeCfg(GPIO_Pin_13, GPIO_ModeOut_PP_5mA); // PA13 - PWM5

GPIOB_ModeCfg(GPIO_Pin_0, GPIO_ModeOut_PP_5mA);? // PB0 - PWM6

GPIOB_ModeCfg(GPIO_Pin_4, GPIO_ModeOut_PP_5mA);? // PB4 - PWM7

GPIOB_ModeCfg(GPIO_Pin_6, GPIO_ModeOut_PP_5mA);? // PB6 - PWM8

GPIOB_ModeCfg(GPIO_Pin_7, GPIO_ModeOut_PP_5mA);? // PB7 - PWM9

GPIOB_ModeCfg(GPIO_Pin_14, GPIO_ModeOut_PP_5mA); // PB14 - PWM10

//? GPIOB_ModeCfg(GPIO_Pin_23, GPIO_ModeOut_PP_5mA); // PB23 - PWM11 此腳復(fù)用為外部復(fù)位腳,需要關(guān)閉此功能才能開(kāi)啟PWM功能


PWMX_CLKCfg(4);? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?// cycle = 4/Fsys

PWMX_CycleCfg(PWMX_Cycle_64);? ? ? ? ? ? ? ? ? ? ?// 周期 = 64*cycle

PWMX_ACTOUT(CH_PWM4, 64 / 4, Low_Level, ENABLE);? // 25% 占空比

PWMX_ACTOUT(CH_PWM5, 64 / 4, Low_Level, ENABLE);? // 25% 占空比

PWMX_ACTOUT(CH_PWM6, 64 / 4, Low_Level, ENABLE);? // 25% 占空比

PWMX_ACTOUT(CH_PWM7, 64 / 4, Low_Level, ENABLE);? // 25% 占空比

PWMX_ACTOUT(CH_PWM8, 64 / 4, Low_Level, ENABLE);? // 25% 占空比

PWMX_ACTOUT(CH_PWM9, 64 / 4, Low_Level, ENABLE);? // 25% 占空比

PWMX_ACTOUT(CH_PWM10, 64 / 4, Low_Level, ENABLE); // 25% 占空比


Can I send these values directly from my app?



You can turn on the LED by writing a value through the wirte channel. The specific operations need to be done through your code. The key here is the code that you're lighting up or you're doing something else and the key here is what your code is doing. Refer to the routines we provide for the types of values written accordingly.


只有登錄才能回復(fù),可以選擇微信賬號(hào)登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频