// {
// memcpy(ANT_message_payload_Wait_35, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_35, 1);
// }
// else if (p_incoming_data->Light_Index == 36)
// {
// memcpy(ANT_message_payload_Wait_36, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_36, 1);
// }
// else if (p_incoming_data->Light_Index == 37)
// {
// memcpy(ANT_message_payload_Wait_37, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_37, 1);
// }
// else if (p_incoming_data->Light_Index == 38)
// {
// memcpy(ANT_message_payload_Wait_38, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_38, 1);
// }
// else if (p_incoming_data->Light_Index == 39)
// {
// memcpy(ANT_message_payload_Wait_39, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_39, 1);
// }
// else if (p_incoming_data->Light_Index == 40)
// {
// memcpy(ANT_message_payload_Wait_40, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_40, 1);
// }
// else if (p_incoming_data->Light_Index == 41)
// {
// memcpy(ANT_message_payload_Wait_41, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_41, 1);
// }
// else if (p_incoming_data->Light_Index == 42)
// {
// memcpy(ANT_message_payload_Wait_42, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_42, 1);
// }
// else if (p_incoming_data->Light_Index == 43)
// {
// memcpy(ANT_message_payload_Wait_43, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_43, 1);
// }
// else if (p_incoming_data->Light_Index == 44)
// {
// memcpy(ANT_message_payload_Wait_44, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_44, 1);
// }
// else if (p_incoming_data->Light_Index == 45)
// {
// memcpy(ANT_message_payload_Wait_45, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_45, 1);
// }
// else if (p_incoming_data->Light_Index == 46)
// {
// memcpy(ANT_message_payload_Wait_46, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_46, 1);
// }
// else if (p_incoming_data->Light_Index == 47)
// {
// memcpy(ANT_message_payload_Wait_47, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_47, 1);
// }
// else if (p_incoming_data->Light_Index == 48)
// {
// memcpy(ANT_message_payload_Wait_48, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_48, 1);
// }
// else if (p_incoming_data->Light_Index == 49)
// {
// memcpy(ANT_message_payload_Wait_49, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_49, 1);
// }
// else if (p_incoming_data->Light_Index == 50)
// {
// memcpy(ANT_message_payload_Wait_50, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_50, 1);
// }
// else if (p_incoming_data->Light_Index == 51)
// {
// memcpy(ANT_message_payload_Wait_51, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_51, 1);
// }
// else if (p_incoming_data->Light_Index == 52)
// {
// memcpy(ANT_message_payload_Wait_52, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_52, 1);
// }
// else if (p_incoming_data->Light_Index == 53)
// {
// memcpy(ANT_message_payload_Wait_53, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_53, 1);
// }
// else if (p_incoming_data->Light_Index == 54)
// {
// memcpy(ANT_message_payload_Wait_54, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_54, 1);
// }
// else if (p_incoming_data->Light_Index == 55)
// {
// memcpy(ANT_message_payload_Wait_55, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_55, 1);
// }
// else if (p_incoming_data->Light_Index == 56)
// {
// memcpy(ANT_message_payload_Wait_56, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_56, 1);
// }
// else if (p_incoming_data->Light_Index == 57)
// {
// memcpy(ANT_message_payload_Wait_57, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_57, 1);
// }
// else if (p_incoming_data->Light_Index == 58)
// {
// memcpy(ANT_message_payload_Wait_58, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_58, 1);
// }
// else if (p_incoming_data->Light_Index == 59)
// {
// memcpy(ANT_message_payload_Wait_59, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_59, 1);
// }
// else if (p_incoming_data->Light_Index == 60)
// {
// memcpy(ANT_message_payload_Wait_60, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_60, 1);
// }
// else if (p_incoming_data->Light_Index == 61)
// {
// memcpy(ANT_message_payload_Wait_61, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_61, 1);
// }
// else if (p_incoming_data->Light_Index == 62)
// {
// memcpy(ANT_message_payload_Wait_62, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_62, 1);
// }
// else if (p_incoming_data->Light_Index == 63)
// {
// memcpy(ANT_message_payload_Wait_63, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Channel_sens_message_encode(ANT_message_payload_Wait_63, 1);
// }
ANT_PAGE_NEW_Wait = 2; //Send the specified page
}
else
{
if (SystemInit_Type.ANT_SHARED_CHANNEL == 1 && SystemReg.ANT_SHARED_CHANNEL == 2)
{
uint32_t err_code;
memcpy(ANT_message_payload_Shared_Wait, p_incoming_data, sizeof(ant_BikeLight_page2_data_t)); //Copy non-self content to the shared channel buffer
// ANT_Relay_New_Share_Page = 2; //Send the specified page
ANT_Shared_Channel_sens_message_encode(ANT_message_payload_Shared_Wait, 2); //Reorganize the command
err_code = ANT_Send_Message(BikeLight_Shared_CHANNEL_NUMBER, ANT_message_payload_Shared_Wait);
SEGGER_RTT_printf(0, "[Channel1_Forward]---TX page_%02d: %02X %02X %02X %02X %02X %02X %02X %02X --err_code:%dnr",
2, Replace_Buff(ANT_message_payload_Shared_Wait), err_code); //Print and send shared command
//ANT_Relay_New_Share_Page = 0; //Reset
}
else
{
SEGGER_RTT_printf(0, "No ININ ANT_SHARED_CHANNEL!!!rn");
}
}
}
}
```c
/* Copyright (c) 2015 Nordic Semiconductor. All Rights Reserved.
*
* The information contained herein is property of Nordic Semiconductor ASA.
* Terms and conditions of usage are described in detail in NORDIC
* SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT.
*
* Licensees are granted free, non-transferable use of the information. NO
* WARRANTY of ANY KIND is provided. This heading must NOT be removed from
* the file.
*
*/
#ifndef ANT_BIKELIGHT_PAGE_2_H__
#define ANT_BIKELIGHT_PAGE_2_H__
/*************Light_State_ModeNum***Supported standard mode bit fields************************
LSB:
0 Reserved for future use. Set to 0
1 Always on: 81 - 100% brightness 0--Not supported 1--Supported
2 Always on: 61 - 80% brightness 0--Not supported 1--Supported
3 Always on: 41 - 60% brightness 0--Not supported 1--Supported
4 Always on: 21 - 40% brightness 0--Not supported 1--Supported
5 Constantly on: 0 - 20% brightness 0--Not supported 1--Supported
6 Slow flash 0--Not supported 1--Supported
7 Fast flashing 0--Not supported 1--Supported
MSB:
0 Random flashing 0--Not supported 1--Supported
1 Automatic 0--Not supported 1--Supported
Previous article:[vscode][nrf51][nrf52] uint8_t uint16_t uint32_t etc. variables are abnormal
Next article:[ANT+][nrf51422][s210] Bicycle Light Data Page 1 – Light Status 1 (0x01)
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Detailed explanation of intelligent car body perception system
- How to solve the problem that the servo drive is not enabled
- Why does the servo drive not power on?
- What point should I connect to when the servo is turned on?
- How to turn on the internal enable of Panasonic servo drive?
- What is the rigidity setting of Panasonic servo drive?
- How to change the inertia ratio of Panasonic servo drive
- What is the inertia ratio of the servo motor?
- Is it better for the motor to have a large or small moment of inertia?
- What is the difference between low inertia and high inertia of servo motors?
- NUCLEO's ST-LINK is changed to 1.8V and the computer cannot recognize the hardware
- What programming method should be used for the M9S8AC16CG chip?
- [National Technology Low Power Series N32L43x Review] 2. RT-Thread Transplantation + LED Demonstration
- Repair a headset
- DSP IIR digital filter implementation program source code
- Where can I download the device data sheet of Taiwan REALTEK (Realtek)?
- NXP Rapid IoT Review] +③ NXP Rapid IoT online compilation and operation of various demos
- iis3dwb three-axis acceleration sensor driver code PCB package
- Pre-registration for the live broadcast with prizes | Rochester Electronics Semiconductor Full Cycle Solutions Help You Deal with Supply Chain Disruptions and Component Outages...
- [Project Source Code] Do you really know how to check the compilation error information of NIOS II C program?