You are here

Missing API documentation for CapSense_ADC Component | 赛普拉斯半导体

Missing API documentation for CapSense_ADC Component

We released a new component in PSoC Creator 3.3 SP2 called “CapSense_ADC”. Unfortunately, the API documentation is missing from the component datasheet.  To get the complete datasheet, please go here. This will be fixed in PSoC Creator 4.0.


The CapSense_ADC component supports the usual widgets such as buttons, matrix buttons, sliders, touchpads, and proximity sensors with the bonus of added analog-to-digital converter (ADC) functionality.  It has a new, easier-to-use interface as well.

One thing to note - The CapSense_P4 component is not an update of the CapSense_CSD_P4 component, which is still shipped with PSoC Creator so that existing projects will continue to work. It is completely new, with a more streamlined Customizer GUI and very different firmware API philosophy. If you are working on a project with the older component, we recommend backing up your design before replacing the component in your schematic.

The firmware changes are documented in the component datasheet in the Migration Guide section. Some notable changes are as follows.

  • The CapSense_Start() function automatically initializes the tuner interface and baselines so that, for example, there is no need to call the CapSense_InitializeAllBaselines() function.
  • Low power operation is improved with the use of a single function, CapSense_ProcessAllWidgets(), to read all results of a scan in one action.
  • Baselines are automatically updated in CapSense_ProcessAllWidgets() so there is no need to call the CapSense_UpdateEnabledBaselines() function.
  • The widget interrogation functions, such as CapSense_CheckIsWidgetActive(), are replaced by new functions, such as CapSense_IsWidgetActive(), that only look at the processed data.
  • The macros for each widget have new naming formats. For example, a single button widget would default to CapSense_BUTTON0_WDGT_ID instead of CapSense_BUTTON0__BTN with that annoying double underscore.
  • The tuner is enabled with just a single function, Capsense_RunTuner(), which no longer blocks the application.

Here is some example code to highlight the differences in the approach to a single button implementation.

CapSense_P4 (v3.0)  CapSense_CSD_P4 (v2.40)

CyGlobalIntEnable;

CapSense_Start();

CapSense_ScanAllWidgets();

for(;;)

{

 if( CapSense_NOT_BUSY == CapSense_IsBusy() )

 {

    CapSense_ProcessAllWidgets();

   if ( CapSense_IsWidgetActive(CapSense_BUTTON0_WDGT_ID) )

   {

     /* Do something */

   }

    CapSense_ScanAllWidgets();

 }

}

CyGlobalIntEnable;

CapSense_Start();

CapSense_InitializeAllBaselines();

CapSense_ScanEnabledWidgets();

for(;;)

{

 if( CapSense_NOT_BUSY == CapSense_IsBusy() )

 {

   if ( CapSense_CheckIsWidgetActive( CapSense_BUTTON0__BTN ) )

   {

     /* Do something */

   }

    CapSense_UpdateEnabledBaselines();

    CapSense_ScanEnabledWidgets();

 }

}

Blog: 

Comments

Carlos's picture

Hi,

Any proposed release date for Creator 4.0?

Thanks for the continuous improvement :D

本网站上的所有内容和材料均“按原样”提供。赛普拉斯半导体公司及其各个供应商对这些材料用于任何用途的适用性不作陈述,并且对关于这些材料的所有担保和条件概不负责,包括但不限于有关适销性、针对特定用途之适用性、权利和不侵犯任何第三方知识产权的所有暗示担保和条件。赛普拉斯半导体公司不授予任何明示或暗示的许可(无论是以默许方式或是任何其他方式)。使用本网站上的信息可能需要第三方的许可,或赛普拉斯半导体公司的许可。

本网站上的内容可能包含或必须遵守关于使用的特定准则或限制。所有帖子和使用本网站上的内容都必须遵守本网站的条款与条件;使用这些内容的第三方必须同意遵守任何限制或准则,并遵守本网站的条款与条件。赛普拉斯半导体公司及其供应商保留随时对内容和材料、产品、计划和服务进行纠正、删除、修改、增强、改进或其他变更,或者移动或终止任何内容、产品、计划或服务的权利,恕不另行通知。