forked from espressif/esp-idf
pcnt: add test with -O0
This commit is contained in:
@@ -2,6 +2,6 @@ CONFIG_COMPILER_DUMP_RTL_FILES=y
|
|||||||
CONFIG_PCNT_CTRL_FUNC_IN_IRAM=y
|
CONFIG_PCNT_CTRL_FUNC_IN_IRAM=y
|
||||||
CONFIG_PCNT_ISR_IRAM_SAFE=y
|
CONFIG_PCNT_ISR_IRAM_SAFE=y
|
||||||
CONFIG_GPIO_CTRL_FUNC_IN_IRAM=y
|
CONFIG_GPIO_CTRL_FUNC_IN_IRAM=y
|
||||||
|
CONFIG_COMPILER_OPTIMIZATION_NONE=y
|
||||||
# silent the error check, as the error string are stored in rodata, causing RTL check failure
|
# silent the error check, as the error string are stored in rodata, causing RTL check failure
|
||||||
CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y
|
CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT=y
|
||||||
|
@@ -89,6 +89,7 @@ static inline void pcnt_ll_set_level_action(pcnt_dev_t *hw, uint32_t unit, uint3
|
|||||||
* @param unit Pulse Counter unit number
|
* @param unit Pulse Counter unit number
|
||||||
* @return PCNT count value (a signed integer)
|
* @return PCNT count value (a signed integer)
|
||||||
*/
|
*/
|
||||||
|
__attribute__((always_inline))
|
||||||
static inline int pcnt_ll_get_count(pcnt_dev_t *hw, uint32_t unit)
|
static inline int pcnt_ll_get_count(pcnt_dev_t *hw, uint32_t unit)
|
||||||
{
|
{
|
||||||
typeof(hw->cnt_unit[unit]) cnt_reg = hw->cnt_unit[unit];
|
typeof(hw->cnt_unit[unit]) cnt_reg = hw->cnt_unit[unit];
|
||||||
@@ -102,6 +103,7 @@ static inline int pcnt_ll_get_count(pcnt_dev_t *hw, uint32_t unit)
|
|||||||
* @param hw Peripheral PCNT hardware instance address.
|
* @param hw Peripheral PCNT hardware instance address.
|
||||||
* @param unit PCNT unit number
|
* @param unit PCNT unit number
|
||||||
*/
|
*/
|
||||||
|
__attribute__((always_inline))
|
||||||
static inline void pcnt_ll_stop_count(pcnt_dev_t *hw, uint32_t unit)
|
static inline void pcnt_ll_stop_count(pcnt_dev_t *hw, uint32_t unit)
|
||||||
{
|
{
|
||||||
hw->ctrl.val |= 1 << (2 * unit + 1);
|
hw->ctrl.val |= 1 << (2 * unit + 1);
|
||||||
@@ -113,6 +115,7 @@ static inline void pcnt_ll_stop_count(pcnt_dev_t *hw, uint32_t unit)
|
|||||||
* @param hw Peripheral PCNT hardware instance address.
|
* @param hw Peripheral PCNT hardware instance address.
|
||||||
* @param unit PCNT unit number, select from uint32_t
|
* @param unit PCNT unit number, select from uint32_t
|
||||||
*/
|
*/
|
||||||
|
__attribute__((always_inline))
|
||||||
static inline void pcnt_ll_start_count(pcnt_dev_t *hw, uint32_t unit)
|
static inline void pcnt_ll_start_count(pcnt_dev_t *hw, uint32_t unit)
|
||||||
{
|
{
|
||||||
hw->ctrl.val &= ~(1 << (2 * unit + 1));
|
hw->ctrl.val &= ~(1 << (2 * unit + 1));
|
||||||
@@ -124,6 +127,7 @@ static inline void pcnt_ll_start_count(pcnt_dev_t *hw, uint32_t unit)
|
|||||||
* @param hw Peripheral PCNT hardware instance address.
|
* @param hw Peripheral PCNT hardware instance address.
|
||||||
* @param unit PCNT unit number, select from uint32_t
|
* @param unit PCNT unit number, select from uint32_t
|
||||||
*/
|
*/
|
||||||
|
__attribute__((always_inline))
|
||||||
static inline void pcnt_ll_clear_count(pcnt_dev_t *hw, uint32_t unit)
|
static inline void pcnt_ll_clear_count(pcnt_dev_t *hw, uint32_t unit)
|
||||||
{
|
{
|
||||||
hw->ctrl.val |= 1 << (2 * unit);
|
hw->ctrl.val |= 1 << (2 * unit);
|
||||||
|
@@ -89,6 +89,7 @@ static inline void pcnt_ll_set_level_action(pcnt_dev_t *hw, uint32_t unit, uint3
|
|||||||
* @param unit Pulse Counter unit number
|
* @param unit Pulse Counter unit number
|
||||||
* @return PCNT count value (a signed integer)
|
* @return PCNT count value (a signed integer)
|
||||||
*/
|
*/
|
||||||
|
__attribute__((always_inline))
|
||||||
static inline int pcnt_ll_get_count(pcnt_dev_t *hw, uint32_t unit)
|
static inline int pcnt_ll_get_count(pcnt_dev_t *hw, uint32_t unit)
|
||||||
{
|
{
|
||||||
pcnt_un_cnt_reg_t cnt_reg = hw->cnt_unit[unit];
|
pcnt_un_cnt_reg_t cnt_reg = hw->cnt_unit[unit];
|
||||||
@@ -102,6 +103,7 @@ static inline int pcnt_ll_get_count(pcnt_dev_t *hw, uint32_t unit)
|
|||||||
* @param hw Peripheral PCNT hardware instance address.
|
* @param hw Peripheral PCNT hardware instance address.
|
||||||
* @param unit PCNT unit number
|
* @param unit PCNT unit number
|
||||||
*/
|
*/
|
||||||
|
__attribute__((always_inline))
|
||||||
static inline void pcnt_ll_stop_count(pcnt_dev_t *hw, uint32_t unit)
|
static inline void pcnt_ll_stop_count(pcnt_dev_t *hw, uint32_t unit)
|
||||||
{
|
{
|
||||||
hw->ctrl.val |= 1 << (2 * unit + 1);
|
hw->ctrl.val |= 1 << (2 * unit + 1);
|
||||||
@@ -113,6 +115,7 @@ static inline void pcnt_ll_stop_count(pcnt_dev_t *hw, uint32_t unit)
|
|||||||
* @param hw Peripheral PCNT hardware instance address.
|
* @param hw Peripheral PCNT hardware instance address.
|
||||||
* @param unit PCNT unit number, select from uint32_t
|
* @param unit PCNT unit number, select from uint32_t
|
||||||
*/
|
*/
|
||||||
|
__attribute__((always_inline))
|
||||||
static inline void pcnt_ll_start_count(pcnt_dev_t *hw, uint32_t unit)
|
static inline void pcnt_ll_start_count(pcnt_dev_t *hw, uint32_t unit)
|
||||||
{
|
{
|
||||||
hw->ctrl.val &= ~(1 << (2 * unit + 1));
|
hw->ctrl.val &= ~(1 << (2 * unit + 1));
|
||||||
@@ -124,6 +127,7 @@ static inline void pcnt_ll_start_count(pcnt_dev_t *hw, uint32_t unit)
|
|||||||
* @param hw Peripheral PCNT hardware instance address.
|
* @param hw Peripheral PCNT hardware instance address.
|
||||||
* @param unit PCNT unit number, select from uint32_t
|
* @param unit PCNT unit number, select from uint32_t
|
||||||
*/
|
*/
|
||||||
|
__attribute__((always_inline))
|
||||||
static inline void pcnt_ll_clear_count(pcnt_dev_t *hw, uint32_t unit)
|
static inline void pcnt_ll_clear_count(pcnt_dev_t *hw, uint32_t unit)
|
||||||
{
|
{
|
||||||
hw->ctrl.val |= 1 << (2 * unit);
|
hw->ctrl.val |= 1 << (2 * unit);
|
||||||
|
@@ -89,6 +89,7 @@ static inline void pcnt_ll_set_level_action(pcnt_dev_t *hw, uint32_t unit, uint3
|
|||||||
* @param unit Pulse Counter unit number
|
* @param unit Pulse Counter unit number
|
||||||
* @return PCNT count value (a signed integer)
|
* @return PCNT count value (a signed integer)
|
||||||
*/
|
*/
|
||||||
|
__attribute__((always_inline))
|
||||||
static inline int pcnt_ll_get_count(pcnt_dev_t *hw, uint32_t unit)
|
static inline int pcnt_ll_get_count(pcnt_dev_t *hw, uint32_t unit)
|
||||||
{
|
{
|
||||||
pcnt_un_cnt_reg_t cnt_reg = hw->cnt_unit[unit];
|
pcnt_un_cnt_reg_t cnt_reg = hw->cnt_unit[unit];
|
||||||
@@ -102,6 +103,7 @@ static inline int pcnt_ll_get_count(pcnt_dev_t *hw, uint32_t unit)
|
|||||||
* @param hw Peripheral PCNT hardware instance address.
|
* @param hw Peripheral PCNT hardware instance address.
|
||||||
* @param unit PCNT unit number
|
* @param unit PCNT unit number
|
||||||
*/
|
*/
|
||||||
|
__attribute__((always_inline))
|
||||||
static inline void pcnt_ll_stop_count(pcnt_dev_t *hw, uint32_t unit)
|
static inline void pcnt_ll_stop_count(pcnt_dev_t *hw, uint32_t unit)
|
||||||
{
|
{
|
||||||
hw->ctrl.val |= 1 << (2 * unit + 1);
|
hw->ctrl.val |= 1 << (2 * unit + 1);
|
||||||
@@ -113,6 +115,7 @@ static inline void pcnt_ll_stop_count(pcnt_dev_t *hw, uint32_t unit)
|
|||||||
* @param hw Peripheral PCNT hardware instance address.
|
* @param hw Peripheral PCNT hardware instance address.
|
||||||
* @param unit PCNT unit number, select from uint32_t
|
* @param unit PCNT unit number, select from uint32_t
|
||||||
*/
|
*/
|
||||||
|
__attribute__((always_inline))
|
||||||
static inline void pcnt_ll_start_count(pcnt_dev_t *hw, uint32_t unit)
|
static inline void pcnt_ll_start_count(pcnt_dev_t *hw, uint32_t unit)
|
||||||
{
|
{
|
||||||
hw->ctrl.val &= ~(1 << (2 * unit + 1));
|
hw->ctrl.val &= ~(1 << (2 * unit + 1));
|
||||||
@@ -124,6 +127,7 @@ static inline void pcnt_ll_start_count(pcnt_dev_t *hw, uint32_t unit)
|
|||||||
* @param hw Peripheral PCNT hardware instance address.
|
* @param hw Peripheral PCNT hardware instance address.
|
||||||
* @param unit PCNT unit number, select from uint32_t
|
* @param unit PCNT unit number, select from uint32_t
|
||||||
*/
|
*/
|
||||||
|
__attribute__((always_inline))
|
||||||
static inline void pcnt_ll_clear_count(pcnt_dev_t *hw, uint32_t unit)
|
static inline void pcnt_ll_clear_count(pcnt_dev_t *hw, uint32_t unit)
|
||||||
{
|
{
|
||||||
hw->ctrl.val |= 1 << (2 * unit);
|
hw->ctrl.val |= 1 << (2 * unit);
|
||||||
|
Reference in New Issue
Block a user