PSoC

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MAO
Level 5
Level 5
Distributor - Macnica (Japan)
5 solutions authored 50 replies posted 100 sign-ins

<Unable to change the CapSense Variable in CapSense_Structure.h>
CapSense_Structure.hの一部変数を変更したいのですが、変更しても、PSoC Creatorがソースコードを生成すると、元に戻ってしまいます。

CapSense_RAM_WD_BASE_STRUCT とCapSense_RAM_WD_BUTTON_STRUCT 内のメンバーのうち、uint8で定義されている noiseTh、nNoiseTh、hysteresisをuint16に変更したい。

現状は以下のパラメータに255以上の値を入力しようとするとGUIでエラーが出て設定できない。
Noise threshold
Negative noise threshold
Hysteresis

CapSense v7.0

0 Likes
1 Solution
AikoO_51
Moderator
Moderator
Moderator
100 sign-ins First question asked 50 solutions authored

自動生成コードをカスタマイズする際には、"Build Setting”の“Skip Code Generation”をTrueにすることでご使用いただけます。

Aiko Ohtaka
Infineon Technologies

View solution in original post

2 Replies
AikoO_51
Moderator
Moderator
Moderator
100 sign-ins First question asked 50 solutions authored

自動生成コードをカスタマイズする際には、"Build Setting”の“Skip Code Generation”をTrueにすることでご使用いただけます。

Aiko Ohtaka
Infineon Technologies
NaMo_1534561
Level 5
Level 5
Distributor - Macnica (Japan)
100 replies posted 100 sign-ins 50 replies posted

CapSense_Structure.hを含むGenerated Sourceフォルダ内に生成される ファイルはBuild時にツールが自動生成します。 そのため、ユーザーの変更は上書きされてしまいます。

従ってご質問頂いた

   Noise threshold

   Negative noise threshold

   Hysteresis

の変数の型をユーザー側で変更することは出来ません。

 

例外として割り込み処理の中に一部コードを追記できる箇所があります。

例)CapSense_ISR.c

 /*******************************************************************************
* Place your includes, defines and code here
********************************************************************************/

/* `#START CapSense_ISR_intc` */

  /* `#END` */

 

  /* Place your Interrupt code here. */

  /* `#START CapSense_ISR_Interrupt` */

  /* `#END` */

#STARTと#ENDの間に挿入したコードはBuildしても保存されます。

0 Likes