├── .gitignore ├── Makefile ├── README.md ├── include ├── battery.h ├── ble_bondmngr_cfg.h ├── led.h └── main.h ├── lib ├── nrf51sdk │ └── Nordic │ │ └── nrf51822 │ │ ├── Board │ │ ├── nrf6310 │ │ │ ├── ble │ │ │ │ ├── ble_app_alert_notification │ │ │ │ │ ├── AlertNotifServer.bin │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_alert_notification.uvopt │ │ │ │ │ │ └── ble_app_alert_notification.uvproj │ │ │ │ │ ├── ble_bondmngr_cfg.h │ │ │ │ │ └── main.c │ │ │ │ ├── ble_app_bps │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_bps.uvopt │ │ │ │ │ │ └── ble_app_bps.uvproj │ │ │ │ │ ├── ble_bondmngr_cfg.h │ │ │ │ │ └── main.c │ │ │ │ ├── ble_app_cscs │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_cscs.uvopt │ │ │ │ │ │ └── ble_app_cscs.uvproj │ │ │ │ │ ├── ble_bondmngr_cfg.h │ │ │ │ │ └── main.c │ │ │ │ ├── ble_app_dtm │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_dtm.uvopt │ │ │ │ │ │ └── ble_app_dtm.uvproj │ │ │ │ │ └── main.c │ │ │ │ ├── ble_app_gls │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_gls.uvopt │ │ │ │ │ │ └── ble_app_gls.uvproj │ │ │ │ │ ├── ble_bondmngr_cfg.h │ │ │ │ │ ├── main.c │ │ │ │ │ └── twi_master_config.h │ │ │ │ ├── ble_app_gzll │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_gzll.uvopt │ │ │ │ │ │ └── ble_app_gzll.uvproj │ │ │ │ │ ├── ble_app_gzll_common.h │ │ │ │ │ ├── ble_app_gzll_device.c │ │ │ │ │ ├── ble_app_gzll_device.h │ │ │ │ │ ├── ble_app_gzll_hr.c │ │ │ │ │ ├── ble_app_gzll_hr.h │ │ │ │ │ ├── ble_app_gzll_ui.c │ │ │ │ │ ├── ble_app_gzll_ui.h │ │ │ │ │ ├── ble_gzll_app_timer.c │ │ │ │ │ ├── main.c │ │ │ │ │ └── system_nrf51.c │ │ │ │ ├── ble_app_hids_keyboard │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_hids_keyboard.uvopt │ │ │ │ │ │ └── ble_app_hids_keyboard.uvproj │ │ │ │ │ ├── ble_bondmngr_cfg.h │ │ │ │ │ └── main.c │ │ │ │ ├── ble_app_hids_mouse │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_hids_mouse.uvopt │ │ │ │ │ │ └── ble_app_hids_mouse.uvproj │ │ │ │ │ ├── ble_bondmngr_cfg.h │ │ │ │ │ └── main.c │ │ │ │ ├── ble_app_hrs │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_hrs.uvopt │ │ │ │ │ │ └── ble_app_hrs.uvproj │ │ │ │ │ ├── ble_bondmngr_cfg.h │ │ │ │ │ └── main.c │ │ │ │ ├── ble_app_hts │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_hts.uvopt │ │ │ │ │ │ └── ble_app_hts.uvproj │ │ │ │ │ ├── ble_bondmngr_cfg.h │ │ │ │ │ └── main.c │ │ │ │ ├── ble_app_proximity │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_proximity.uvopt │ │ │ │ │ │ └── ble_app_proximity.uvproj │ │ │ │ │ ├── ble_bondmngr_cfg.h │ │ │ │ │ ├── findMeMasterServer.bin │ │ │ │ │ └── main.c │ │ │ │ ├── ble_app_pwr_profiling │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_pwr_profiling.uvopt │ │ │ │ │ │ └── ble_app_pwr_profiling.uvproj │ │ │ │ │ └── main.c │ │ │ │ ├── ble_app_rscs │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_rscs.uvopt │ │ │ │ │ │ └── ble_app_rscs.uvproj │ │ │ │ │ ├── ble_bondmngr_cfg.h │ │ │ │ │ └── main.c │ │ │ │ └── ble_app_template │ │ │ │ │ ├── arm │ │ │ │ │ ├── ble_app_template.uvopt │ │ │ │ │ └── ble_app_template.uvproj │ │ │ │ │ └── main.c │ │ │ ├── blinky_example │ │ │ │ ├── arm │ │ │ │ │ ├── blinky.uvopt │ │ │ │ │ └── blinky.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── debouncer_example │ │ │ │ ├── arm │ │ │ │ │ ├── debouncer_example.uvopt │ │ │ │ │ └── debouncer_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ ├── lib_debounce.c │ │ │ │ ├── lib_debounce.h │ │ │ │ └── main.c │ │ │ ├── esb │ │ │ │ └── esb_ptx_prx │ │ │ │ │ ├── arm │ │ │ │ │ ├── esb_prx_ack_payload.uvopt │ │ │ │ │ ├── esb_prx_ack_payload.uvproj │ │ │ │ │ ├── esb_ptx_ack_payload.uvopt │ │ │ │ │ └── esb_ptx_ack_payload.uvproj │ │ │ │ │ ├── gcc │ │ │ │ │ ├── esb_prx_ack_payload.makefile │ │ │ │ │ └── esb_ptx_ack_payload.makefile │ │ │ │ │ ├── main_esb_prx_ack_payload.c │ │ │ │ │ └── main_esb_ptx_ack_payload.c │ │ │ ├── ext_sensors │ │ │ │ ├── adns2080_example │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── adns2080_example.uvopt │ │ │ │ │ │ └── adns2080_example.uvproj │ │ │ │ │ ├── gcc │ │ │ │ │ │ ├── Makefile │ │ │ │ │ │ ├── build.bat │ │ │ │ │ │ └── flash.bat │ │ │ │ │ ├── main.c │ │ │ │ │ └── sdio_config.h │ │ │ │ └── cherry8x16_example │ │ │ │ │ ├── arm │ │ │ │ │ ├── cherry8x16_example.uvopt │ │ │ │ │ └── cherry8x16_example.uvproj │ │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ │ └── main.c │ │ │ ├── flashwrite_example │ │ │ │ ├── arm │ │ │ │ │ ├── flashwrite_example.uvopt │ │ │ │ │ └── flashwrite_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── gpiote_example │ │ │ │ ├── arm │ │ │ │ │ ├── gpiote_example.uvopt │ │ │ │ │ └── gpiote_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── gzll │ │ │ │ ├── gzll_ack_payload │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── gzll_device_ack_payload.uvopt │ │ │ │ │ │ ├── gzll_device_ack_payload.uvproj │ │ │ │ │ │ ├── gzll_host_ack_payload.uvopt │ │ │ │ │ │ └── gzll_host_ack_payload.uvproj │ │ │ │ │ ├── gcc │ │ │ │ │ │ ├── gzll_device_ack_payload.makefile │ │ │ │ │ │ └── gzll_host_ack_payload.makefile │ │ │ │ │ ├── main_device_ack_payload.c │ │ │ │ │ └── main_host_ack_payload.c │ │ │ │ ├── gzp_desktop_emulator │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── gzp_desktop_mouse_keyboard_emulator_nrf51.uvopt │ │ │ │ │ │ └── gzp_desktop_mouse_keyboard_emulator_nrf51.uvproj │ │ │ │ │ ├── keyboard_emulator.c │ │ │ │ │ ├── keyboard_emulator.h │ │ │ │ │ ├── main_mouse_keyboard_emulator_nrf51.c │ │ │ │ │ ├── mouse_sensor_emulator.c │ │ │ │ │ ├── mouse_sensor_emulator.h │ │ │ │ │ ├── nrf_gzllde_params.h │ │ │ │ │ └── nrf_gzp_config.h │ │ │ │ └── gzp_dynamic_pairing │ │ │ │ │ ├── arm │ │ │ │ │ ├── gzp_device_dynamic_pairing.uvopt │ │ │ │ │ └── gzp_device_dynamic_pairing.uvproj │ │ │ │ │ ├── main_device_dynamic_pairing.c │ │ │ │ │ └── nrf_gzp_config.h │ │ │ ├── nRF6350_radio_configuration_example │ │ │ │ ├── arm │ │ │ │ │ ├── nRF6350_radio_configuration_example.uvopt │ │ │ │ │ └── nRF6350_radio_configuration_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ ├── main.c │ │ │ │ └── twi_master_config.h │ │ │ ├── pin_change_int_example │ │ │ │ ├── arm │ │ │ │ │ ├── pin_change_int_example.uvopt │ │ │ │ │ └── pin_change_int_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── ppi_example │ │ │ │ ├── arm │ │ │ │ │ ├── ppi_example.uvopt │ │ │ │ │ └── ppi_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── pwm_analyzer │ │ │ │ ├── arm │ │ │ │ │ ├── pwm_analyzer.uvopt │ │ │ │ │ └── pwm_analyzer.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── pwm_example │ │ │ │ ├── arm │ │ │ │ │ ├── pwm_example.uvopt │ │ │ │ │ └── pwm_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── radio_example │ │ │ │ ├── arm │ │ │ │ │ ├── radio_rx_example.uvopt │ │ │ │ │ ├── radio_rx_example.uvproj │ │ │ │ │ ├── radio_tx_example.uvopt │ │ │ │ │ └── radio_tx_example.uvproj │ │ │ │ ├── gcc_rx │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ ├── gcc_tx │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ ├── main_rx.c │ │ │ │ ├── main_tx.c │ │ │ │ ├── radio_config.c │ │ │ │ └── radio_config.h │ │ │ ├── radio_test_example │ │ │ │ ├── arm │ │ │ │ │ ├── radio_test_example.uvopt │ │ │ │ │ └── radio_test_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ ├── main.c │ │ │ │ ├── radio_test.c │ │ │ │ ├── radio_test.h │ │ │ │ ├── uart.c │ │ │ │ └── uart.h │ │ │ ├── ram_retention_example │ │ │ │ ├── arm │ │ │ │ │ ├── ram_retention_example.uvopt │ │ │ │ │ └── ram_retention_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── rng_example │ │ │ │ ├── arm │ │ │ │ │ ├── rng_example.uvopt │ │ │ │ │ └── rng_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── rtc_example │ │ │ │ ├── arm │ │ │ │ │ ├── rtc_example.uvopt │ │ │ │ │ └── rtc_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── simple_pwm_motor_control_example │ │ │ │ ├── arm │ │ │ │ │ ├── simple_pwm_motor_control_example.uvopt │ │ │ │ │ └── simple_pwm_motor_control_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── spi_master_example │ │ │ │ ├── arm │ │ │ │ │ ├── spi_master_example.uvopt │ │ │ │ │ └── spi_master_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ ├── main.c │ │ │ │ └── spi_master_config.h │ │ │ ├── temperature_example │ │ │ │ ├── arm │ │ │ │ │ ├── temperature.uvopt │ │ │ │ │ └── temperature.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── template_project │ │ │ │ ├── arm │ │ │ │ │ ├── template_project.uvopt │ │ │ │ │ └── template_project.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── timer_example │ │ │ │ ├── arm │ │ │ │ │ ├── timer_example.uvopt │ │ │ │ │ └── timer_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ │ ├── twi_sw_master_example │ │ │ │ ├── arm │ │ │ │ │ ├── twi_sw_master_example.uvopt │ │ │ │ │ └── twi_sw_master_example.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ ├── main.c │ │ │ │ └── twi_master_config.h │ │ │ └── uart_example │ │ │ │ ├── arm │ │ │ │ ├── uart_example.uvopt │ │ │ │ └── uart_example.uvproj │ │ │ │ ├── gcc │ │ │ │ ├── Makefile │ │ │ │ ├── build.bat │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ ├── nrf6310_experimental │ │ │ ├── ble_s110_serialization │ │ │ │ ├── ble │ │ │ │ │ ├── ble_app_advertising │ │ │ │ │ │ ├── arm │ │ │ │ │ │ │ ├── ble_app_advertising.uvopt │ │ │ │ │ │ │ └── ble_app_advertising.uvproj │ │ │ │ │ │ └── main.c │ │ │ │ │ ├── ble_app_connectivity │ │ │ │ │ │ ├── arm │ │ │ │ │ │ │ ├── ble_app_connectivity.uvopt │ │ │ │ │ │ │ └── ble_app_connectivity.uvproj │ │ │ │ │ │ └── main.c │ │ │ │ │ └── ble_app_hrs │ │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── ble_app_hrs.uvopt │ │ │ │ │ │ └── ble_app_hrs.uvproj │ │ │ │ │ │ ├── ble_bondmngr_cfg.h │ │ │ │ │ │ └── main.c │ │ │ │ ├── include │ │ │ │ │ ├── app_common │ │ │ │ │ │ ├── app_transport.h │ │ │ │ │ │ ├── rpc_transport.h │ │ │ │ │ │ └── rpc_transport_internal.h │ │ │ │ │ └── ble │ │ │ │ │ │ └── rpc │ │ │ │ │ │ ├── ble_rpc_cmd_decoder.h │ │ │ │ │ │ ├── ble_rpc_cmd_defines.h │ │ │ │ │ │ ├── ble_rpc_cmd_encoder.h │ │ │ │ │ │ ├── ble_rpc_cmd_encoder_internal.h │ │ │ │ │ │ ├── ble_rpc_event_decoder.h │ │ │ │ │ │ ├── ble_rpc_event_encoder.h │ │ │ │ │ │ └── ble_rpc_op_codes.h │ │ │ │ └── source │ │ │ │ │ ├── app_common │ │ │ │ │ ├── app_transport_uart.c │ │ │ │ │ └── rpc_transport.c │ │ │ │ │ └── ble │ │ │ │ │ └── rpc │ │ │ │ │ ├── ble_rpc_cmd_decoder.c │ │ │ │ │ ├── ble_rpc_cmd_encoder.c │ │ │ │ │ ├── ble_rpc_event_decoder.c │ │ │ │ │ ├── ble_rpc_event_encoder.c │ │ │ │ │ └── ble_rpc_sd_stub.c │ │ │ └── device_firmware_updates │ │ │ │ ├── bootloader │ │ │ │ ├── arm │ │ │ │ │ ├── arm_bootloader_startup_nrf51.s │ │ │ │ │ ├── bootloader.uvopt │ │ │ │ │ └── bootloader.uvproj │ │ │ │ ├── hrs.bin │ │ │ │ ├── hrs_packet_encoded.bin │ │ │ │ └── main.c │ │ │ │ ├── include │ │ │ │ └── app_common │ │ │ │ │ ├── app_transport.h │ │ │ │ │ ├── rpc_transport.h │ │ │ │ │ └── rpc_transport_internal.h │ │ │ │ └── source │ │ │ │ └── app_common │ │ │ │ ├── app_transport_uart.c │ │ │ │ └── rpc_transport.c │ │ ├── pca10000 │ │ │ ├── button_radio_example │ │ │ │ ├── arm │ │ │ │ │ ├── button_radio_example_rx.uvopt │ │ │ │ │ └── button_radio_example_rx.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ ├── main_rx.c │ │ │ │ ├── radio_config.c │ │ │ │ └── radio_config.h │ │ │ ├── led_radio_example │ │ │ │ ├── arm │ │ │ │ │ ├── led_radio_example_tx.uvopt │ │ │ │ │ └── led_radio_example_tx.uvproj │ │ │ │ ├── gcc │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── build.bat │ │ │ │ │ └── flash.bat │ │ │ │ ├── main_tx.c │ │ │ │ ├── radio_config.c │ │ │ │ └── radio_config.h │ │ │ └── uart_example │ │ │ │ ├── arm │ │ │ │ ├── uart_example.uvopt │ │ │ │ └── uart_example.uvproj │ │ │ │ ├── gcc │ │ │ │ ├── Makefile │ │ │ │ ├── build.bat │ │ │ │ └── flash.bat │ │ │ │ └── main.c │ │ └── pca10001 │ │ │ ├── ble │ │ │ ├── ble_app_hrs │ │ │ │ ├── arm │ │ │ │ │ ├── ble_app_hrs.uvopt │ │ │ │ │ └── ble_app_hrs.uvproj │ │ │ │ ├── battery.c │ │ │ │ ├── battery.h │ │ │ │ ├── ble_bondmngr_cfg.h │ │ │ │ ├── led.c │ │ │ │ ├── led.h │ │ │ │ ├── main.c │ │ │ │ └── main.h │ │ │ └── ble_app_proximity │ │ │ │ ├── arm │ │ │ │ ├── ble_app_proximity.uvopt │ │ │ │ └── ble_app_proximity.uvproj │ │ │ │ ├── ble_bondmngr_cfg.h │ │ │ │ ├── findMeMasterServer.bin │ │ │ │ └── main.c │ │ │ ├── blinky_example │ │ │ ├── arm │ │ │ │ ├── blinky.uvopt │ │ │ │ └── blinky.uvproj │ │ │ ├── gcc │ │ │ │ ├── Makefile │ │ │ │ ├── build.bat │ │ │ │ └── flash.bat │ │ │ └── main.c │ │ │ ├── button_radio_example │ │ │ ├── arm │ │ │ │ ├── button_radio_example_tx.uvopt │ │ │ │ └── button_radio_example_tx.uvproj │ │ │ ├── gcc │ │ │ │ ├── Makefile │ │ │ │ ├── build.bat │ │ │ │ └── flash.bat │ │ │ ├── main_tx.c │ │ │ ├── radio_config.c │ │ │ └── radio_config.h │ │ │ ├── led_radio_example │ │ │ ├── arm │ │ │ │ ├── led_radio_example_rx.uvopt │ │ │ │ └── led_radio_example_rx.uvproj │ │ │ ├── gcc │ │ │ │ ├── Makefile │ │ │ │ ├── build.bat │ │ │ │ └── flash.bat │ │ │ ├── main_rx.c │ │ │ ├── radio_config.c │ │ │ └── radio_config.h │ │ │ └── uart_example │ │ │ ├── arm │ │ │ ├── uart_example.uvopt │ │ │ └── uart_example.uvproj │ │ │ ├── gcc │ │ │ ├── Makefile │ │ │ ├── build.bat │ │ │ └── flash.bat │ │ │ └── main.c │ │ ├── Include │ │ ├── app_common │ │ │ ├── app_button.h │ │ │ ├── app_error.h │ │ │ ├── app_fifo.h │ │ │ ├── app_gpiote.h │ │ │ ├── app_scheduler.h │ │ │ ├── app_timer.h │ │ │ ├── app_uart.h │ │ │ └── app_util.h │ │ ├── ble │ │ │ ├── ble_advdata.h │ │ │ ├── ble_bondmngr.h │ │ │ ├── ble_conn_params.h │ │ │ ├── ble_date_time.h │ │ │ ├── ble_debug_assert_handler.h │ │ │ ├── ble_dtm.h │ │ │ ├── ble_error_log.h │ │ │ ├── ble_eval_board_pins.h │ │ │ ├── ble_flash.h │ │ │ ├── ble_nrf6310_pins.h │ │ │ ├── ble_racp.h │ │ │ ├── ble_radio_notification.h │ │ │ ├── ble_sensorsim.h │ │ │ ├── ble_services │ │ │ │ ├── ble_ans_c.h │ │ │ │ ├── ble_bas.h │ │ │ │ ├── ble_bps.h │ │ │ │ ├── ble_cscs.h │ │ │ │ ├── ble_dis.h │ │ │ │ ├── ble_gls.h │ │ │ │ ├── ble_gls_db.h │ │ │ │ ├── ble_hids.h │ │ │ │ ├── ble_hrs.h │ │ │ │ ├── ble_hts.h │ │ │ │ ├── ble_ias.h │ │ │ │ ├── ble_ias_c.h │ │ │ │ ├── ble_lls.h │ │ │ │ ├── ble_rscs.h │ │ │ │ ├── ble_srv_common.h │ │ │ │ └── ble_tps.h │ │ │ ├── ble_stack_handler.h │ │ │ └── softdevice │ │ │ │ ├── ble.h │ │ │ │ ├── ble_err.h │ │ │ │ ├── ble_gap.h │ │ │ │ ├── ble_gatt.h │ │ │ │ ├── ble_gattc.h │ │ │ │ ├── ble_gatts.h │ │ │ │ ├── ble_hci.h │ │ │ │ ├── ble_l2cap.h │ │ │ │ ├── ble_ranges.h │ │ │ │ ├── ble_types.h │ │ │ │ ├── nrf_error.h │ │ │ │ ├── nrf_error_sdm.h │ │ │ │ ├── nrf_error_soc.h │ │ │ │ ├── nrf_sdm.h │ │ │ │ ├── nrf_soc.h │ │ │ │ ├── nrf_svc.h │ │ │ │ └── softdevice_assert.h │ │ ├── boards.h │ │ ├── boards │ │ │ ├── nrf6310.h │ │ │ ├── pca10000.h │ │ │ ├── pca10001.h │ │ │ └── pca10003.h │ │ ├── common.h │ │ ├── compiler_abstraction.h │ │ ├── console.h │ │ ├── esb │ │ │ ├── nrf_esb.h │ │ │ └── nrf_esb_constants.h │ │ ├── ext_sensors │ │ │ ├── adns2080.h │ │ │ ├── cherry8x16.h │ │ │ ├── ds1624.h │ │ │ ├── mpu6050.h │ │ │ ├── nRF6350.h │ │ │ ├── sdio.h │ │ │ └── synaptics_touchpad.h │ │ ├── gcc │ │ │ ├── core_cm0.h │ │ │ ├── core_cmFunc.h │ │ │ └── core_cmInstr.h │ │ ├── gzll │ │ │ ├── nrf_gzll.h │ │ │ └── nrf_gzll_constants.h │ │ ├── gzp │ │ │ └── nrf_gzp.h │ │ ├── nordic_common.h │ │ ├── nrf.h │ │ ├── nrf51.h │ │ ├── nrf51_bitfields.h │ │ ├── nrf51_deprecated.h │ │ ├── nrf_assert.h │ │ ├── nrf_delay.h │ │ ├── nrf_ecb.h │ │ ├── nrf_gpio.h │ │ ├── nrf_gpiote.h │ │ ├── nrf_nvmc.h │ │ ├── nrf_temp.h │ │ ├── simple_uart.h │ │ ├── spi_master.h │ │ ├── system_nrf51.h │ │ └── twi_master.h │ │ ├── SVD │ │ └── nrf51.xml │ │ └── Source │ │ ├── app_common │ │ ├── app_button.c │ │ ├── app_fifo.c │ │ ├── app_gpiote.c │ │ ├── app_scheduler.c │ │ ├── app_timer.c │ │ └── app_uart.c │ │ ├── ble │ │ ├── ble_advdata.c │ │ ├── ble_bondmngr.c │ │ ├── ble_conn_params.c │ │ ├── ble_debug_assert_handler.c │ │ ├── ble_dtm.c │ │ ├── ble_error_log.c │ │ ├── ble_flash.c │ │ ├── ble_racp.c │ │ ├── ble_radio_notification.c │ │ ├── ble_sensorsim.c │ │ ├── ble_services │ │ │ ├── ble_ans_c.c │ │ │ ├── ble_bas.c │ │ │ ├── ble_bps.c │ │ │ ├── ble_cscs.c │ │ │ ├── ble_dis.c │ │ │ ├── ble_gls.c │ │ │ ├── ble_gls_db.c │ │ │ ├── ble_hids.c │ │ │ ├── ble_hrs.c │ │ │ ├── ble_hts.c │ │ │ ├── ble_ias.c │ │ │ ├── ble_ias_c.c │ │ │ ├── ble_lls.c │ │ │ ├── ble_rscs.c │ │ │ └── ble_tps.c │ │ ├── ble_srv_common.c │ │ └── ble_stack_handler.c │ │ ├── console │ │ └── console.c │ │ ├── ext_sensors │ │ ├── adns2080 │ │ │ └── adns2080.c │ │ ├── cherry8x16 │ │ │ └── cherry8x16.c │ │ ├── ds1624 │ │ │ └── ds1624.c │ │ ├── mpu6050 │ │ │ └── mpu6050.c │ │ ├── nRF6350 │ │ │ └── nRF6350.c │ │ ├── sdio │ │ │ └── sdio.c │ │ └── synaptics_touchpad │ │ │ └── synaptics_touchpad.c │ │ ├── gzp │ │ ├── nrf_gzp.c │ │ └── nrf_gzp_device.c │ │ ├── keil_arm_uv4.lnt │ │ ├── nrf_assert │ │ └── nrf_assert.c │ │ ├── nrf_delay │ │ └── nrf_delay.c │ │ ├── nrf_ecb │ │ └── nrf_ecb.c │ │ ├── nrf_nvmc │ │ └── nrf_nvmc.c │ │ ├── simple_uart │ │ └── simple_uart.c │ │ ├── spi_master │ │ └── spi_master.c │ │ ├── templates │ │ ├── arm │ │ │ └── arm_startup_nrf51.s │ │ ├── gcc │ │ │ ├── Makefile.common │ │ │ ├── Makefile.windows │ │ │ ├── gcc_nrf51_blank_xxaa.ld │ │ │ ├── gcc_nrf51_blank_xxab.ld │ │ │ ├── gcc_nrf51_common.ld │ │ │ ├── gcc_nrf51_s110_xxaa.ld │ │ │ ├── gcc_nrf51_s110_xxab.ld │ │ │ ├── gcc_nrf51_s210_xxaa.ld │ │ │ └── gcc_startup_nrf51.s │ │ └── system_nrf51.c │ │ └── twi_master │ │ ├── twi_hw_master.c │ │ └── twi_sw_master.c └── softdevice │ └── s110_nrf51822_5.1.0_softdevice.hex └── src ├── battery.c ├── led.c └── main.c /.gitignore: -------------------------------------------------------------------------------- 1 | bject files 2 | *.o 3 | 4 | # Libraries 5 | *.lib 6 | *.a 7 | 8 | # Shared objects (inc. Windows DLLs) 9 | *.dll 10 | *.so 11 | *.so.* 12 | *.dylib 13 | 14 | # Executables 15 | *.exe 16 | *.out 17 | *.app 18 | *.map 19 | 20 | *.jlink 21 | *.log 22 | 23 | build/* 24 | obj/* 25 | bin/* 26 | 27 | .DS_Store 28 | -------------------------------------------------------------------------------- /include/battery.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_hrs_eval_battery Battery Level Hardware Handling 18 | * @{ 19 | * @ingroup ble_sdk_app_hrs_eval 20 | * @brief Battery Level Hardware Handling prototypes 21 | * 22 | */ 23 | 24 | #ifndef BATTERY_H__ 25 | #define BATTERY_H__ 26 | 27 | 28 | /**@brief Function to make the ADC start a battery level conversion 29 | */ 30 | void battery_start(void); 31 | 32 | #endif // BATTERY_H__ 33 | 34 | /** @} */ 35 | /** @endcond */ 36 | -------------------------------------------------------------------------------- /include/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_gls_bondmngr_cfg GLS Bond Manager Configuration 18 | * @{ 19 | * @ingroup ble_sdk_app_gls 20 | * @brief Definition of bond manager configurable parameters 21 | */ 22 | 23 | #ifndef BLE_BONDMNGR_CFG_H__ 24 | #define BLE_BONDMNGR_CFG_H__ 25 | 26 | /**@brief Number of CCCDs used in the GLS application. */ 27 | #define BLE_BONDMNGR_CCCD_COUNT 2 28 | 29 | /**@brief Maximum number of bonded masters. */ 30 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 7 31 | 32 | #endif // BLE_BONDMNGR_CFG_H__ 33 | 34 | /** @} */ 35 | /** @endcond */ 36 | -------------------------------------------------------------------------------- /include/led.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_hrs_eval_led LED Handling 18 | * @{ 19 | * @ingroup ble_sdk_app_hrs_eval 20 | * @brief LED Handling prototypes 21 | * 22 | */ 23 | 24 | #ifndef LED_H__ 25 | #define LED_H__ 26 | 27 | 28 | /**@brief Function to start flashing the LED. 29 | * @details This will start the TIMER1 and enable the GPIOTE task that toggles the LED. 30 | * The PPI and GPIOTE configurations done by this app will make this action result in the 31 | * flashing of the LED. 32 | * @pre Can only be called after the SoftDevice is enabled - uses nrf_soc API 33 | */ 34 | void led_start(void); 35 | 36 | /**@brief Function to stop flashing the LED. 37 | * @details This will stop the TIMER1 and disable the GPIOTE task that toggles the LED. 38 | * The PPI and GPIOTE configurations done by this app will 39 | * make this action result in the turning off the LED. 40 | */ 41 | void led_stop(void); 42 | 43 | #endif // LED_H__ 44 | 45 | /** @} */ 46 | /** @endcond */ 47 | -------------------------------------------------------------------------------- /include/main.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_hrs_eval_main Main source file 18 | * @{ 19 | * @ingroup ble_sdk_app_hrs_eval 20 | * @brief Main source file prototypes 21 | * 22 | */ 23 | 24 | #ifndef MAIN_H__ 25 | #define MAIN_H__ 26 | 27 | /**@brief External reference to the Battery Service. */ 28 | extern ble_bas_t bas; 29 | 30 | #endif // MAIN_H__ 31 | 32 | /** @} */ 33 | /** @endcond */ 34 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_alert_notification/AlertNotifServer.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/finnurtorfa/nrf51/910361df704b814e61687630408300924e16ed20/lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_alert_notification/AlertNotifServer.bin -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_alert_notification/arm/ble_app_alert_notification.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_alert_notification/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_alert_notification_bondmngr_cfg Alert Notification Bond Manager Configuration 18 | * @{ 19 | * @ingroup ble_sdk_app_proximity 20 | * @brief Definition of bond manager configurable parameters 21 | */ 22 | 23 | #ifndef BLE_BONDMNGR_CFG_H__ 24 | #define BLE_BONDMNGR_CFG_H__ 25 | 26 | /**@brief Number of CCCDs used in the alert notification application. */ 27 | #define BLE_BONDMNGR_CCCD_COUNT 1 28 | 29 | /**@brief Maximum number of bonded masters. */ 30 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 7 31 | 32 | #endif // BLE_BONDMNGR_CFG_H__ 33 | 34 | /** @} */ 35 | /** @endcond */ 36 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_bps/arm/ble_app_bps.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_bps/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | * $LastChangedRevision$ 12 | */ 13 | 14 | /** @cond To make doxygen skip this file */ 15 | 16 | /** @file 17 | * 18 | * @defgroup ble_sdk_app_cscs_bondmngr_cfg CSCS Bond Manager Configuration 19 | * @{ 20 | * @ingroup ble_sdk_app_cscs 21 | * @brief Definition of bond manager configurable parameters 22 | */ 23 | 24 | #ifndef BLE_BONDMNGR_CFG_H__ 25 | #define BLE_BONDMNGR_CFG_H__ 26 | 27 | /**@brief Number of CCCDs used in the CSCS application. */ 28 | #define BLE_BONDMNGR_CCCD_COUNT 2 29 | 30 | /**@brief Maximum number of bonded masters. */ 31 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 4 32 | 33 | #endif // BLE_BONDMNGR_CFG_H__ 34 | 35 | /** @} */ 36 | /** @endcond */ 37 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_cscs/arm/ble_app_cscs.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_cscs/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_cscs_bondmngr_cfg CSCS Bond Manager Configuration 18 | * @{ 19 | * @ingroup ble_sdk_app_cscs 20 | * @brief Definition of bond manager configurable parameters 21 | */ 22 | 23 | #ifndef BLE_BONDMNGR_CFG_H__ 24 | #define BLE_BONDMNGR_CFG_H__ 25 | 26 | /**@brief Number of CCCDs used in the CSCS application. */ 27 | #define BLE_BONDMNGR_CCCD_COUNT 2 28 | 29 | /**@brief Maximum number of bonded masters. */ 30 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 4 31 | 32 | #endif // BLE_BONDMNGR_CFG_H__ 33 | 34 | /** @} */ 35 | /** @endcond */ 36 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_dtm/arm/ble_app_dtm.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC800 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S0 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8004 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC800 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_gls/arm/ble_app_gls.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_gls/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_gls_bondmngr_cfg GLS Bond Manager Configuration 18 | * @{ 19 | * @ingroup ble_sdk_app_gls 20 | * @brief Definition of bond manager configurable parameters 21 | */ 22 | 23 | #ifndef BLE_BONDMNGR_CFG_H__ 24 | #define BLE_BONDMNGR_CFG_H__ 25 | 26 | /**@brief Number of CCCDs used in the GLS application. */ 27 | #define BLE_BONDMNGR_CCCD_COUNT 3 28 | 29 | /**@brief Maximum number of bonded masters. */ 30 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 7 31 | 32 | #endif // BLE_BONDMNGR_CFG_H__ 33 | 34 | /** @} */ 35 | /** @endcond */ 36 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_gls/twi_master_config.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #ifndef TWI_MASTER_CONFIG 14 | #define TWI_MASTER_CONFIG 15 | 16 | #define TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER (24U) 17 | #define TWI_MASTER_CONFIG_DATA_PIN_NUMBER (25U) 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_gzll/arm/ble_app_gzll.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_gzll/ble_app_gzll_common.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * 15 | * @defgroup ble_sdk_app_gzll_common Common definitions for BLE and Gazell 16 | * @{ 17 | * @ingroup ble_sdk_app_gzll 18 | * @brief Common definitions for BLE and Gazell in the multiprotocol application. 19 | */ 20 | 21 | #ifndef BLE_APP_GZLL_COMMON_H__ 22 | #define BLE_APP_GZLL_COMMON_H__ 23 | 24 | #define APP_GPIOTE_MAX_USERS 1 /**< Maximum number of users of the GPIOTE handler. */ 25 | 26 | #define APP_TIMER_PRESCALER 0 /**< Value of the RTC1 PRESCALER register. */ 27 | #define APP_TIMER_MAX_TIMERS 6 /**< Maximum number of simultaneously created timers. */ 28 | #define APP_TIMER_OP_QUEUE_SIZE 4 /**< Size of timer operation queues. */ 29 | 30 | /**@brief Protocol mode type. */ 31 | typedef enum { 32 | BLE, /**< Bluetooth mode, the application acts a simulated Heart Rate sensor. */ 33 | GAZELL /**< Gazell mode, the application acts as a 'Gazell Device'. */ 34 | }radio_mode_t; 35 | 36 | /**@brief External reference to the current radio mode. */ 37 | extern volatile radio_mode_t running_mode; 38 | 39 | #endif // BLE_APP_GZLL_COMMON_H__ 40 | /** @} */ 41 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_gzll/ble_app_gzll_device.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * 15 | * @defgroup ble_sdk_app_gzll_gazell_part Gazell part of Multiprotocol Application 16 | * @{ 17 | * @ingroup ble_sdk_app_gzll 18 | * @brief Gazell demo application used in the multiprotocol application. 19 | */ 20 | 21 | #ifndef BLE_APP_GZLL_DEVICE_H__ 22 | #define BLE_APP_GZLL_DEVICE_H__ 23 | 24 | /**@brief Initializes and enables Gazell and sends a first packet. 25 | * 26 | * @details This function initializes and enables Gazell as a device and 27 | * add a packet to the TX FIFO to start the data transfer. 28 | * From here on more data will be added through the Gazell callbacks. 29 | */ 30 | void gzll_app_start(void); 31 | 32 | /**@brief Stops Gazell. 33 | * 34 | * @details This function stops Gazell and release all resources used by Gazell. 35 | */ 36 | void gzll_app_stop(void); 37 | 38 | #endif // BLE_APP_GZLL_DEVICE_H__ 39 | /** @} */ 40 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_gzll/ble_app_gzll_hr.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * 15 | * @defgroup ble_sdk_app_gzll_bluetooth_part Bluetooth part of Multiprotocol Application 16 | * @{ 17 | * @ingroup ble_sdk_app_gzll 18 | * @brief Heart rate demo application used in the multiprotocol application. 19 | 20 | * This file contains the source code for the Bluetooth part of multiprotocol 21 | * sample application using the @ref ble_sdk_srv_hrs (and also @ref ble_sdk_srv_bas and 22 | * @ref ble_sdk_srv_dis). This application uses the @ref ble_sdk_lib_conn_params module. 23 | */ 24 | 25 | #ifndef BLE_APP_GZLL_HR_H__ 26 | #define BLE_APP_GZLL_HR_H__ 27 | 28 | /**@brief BLE stack initialization. 29 | * 30 | * @details Initializes the SoftDevice and the BLE event interrupt. 31 | */ 32 | void ble_stack_start(void); 33 | 34 | /**@brief Disable BLE stack. 35 | */ 36 | void ble_stack_stop(void); 37 | 38 | /**@brief Initializes used services and starts the Bluetooth Heart rate application. 39 | * 40 | * @details This function initializes the Heart Rate service, the Battery service and the Device 41 | * information, setup the advertising data and GAP database and then start advertising. 42 | */ 43 | void ble_hrs_app_start(void); 44 | 45 | /**@brief Stops the Bluetooth Heart rate application. 46 | * 47 | * @details This function stops all timers used by the Bluetooth Heart rate application. 48 | */ 49 | void ble_hrs_app_stop(void); 50 | 51 | #endif // BLE_APP_GZLL_HR_H__ 52 | /** @} */ 53 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_gzll/ble_app_gzll_ui.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #include "ble_app_gzll_ui.h" 14 | #include 15 | #include 16 | #include "nordic_common.h" 17 | #include "nrf_soc.h" 18 | #include "app_error.h" 19 | #include "nrf_gpio.h" 20 | #include "app_util.h" 21 | #include "app_button.h" 22 | #include "app_timer.h" 23 | #include "ble_app_gzll_common.h" 24 | 25 | 26 | #define BUTTON_DETECTION_DELAY APP_TIMER_TICKS(50, APP_TIMER_PRESCALER) /**< Delay from a GPIOTE event until a button is reported as pushed (in number of timer ticks). */ 27 | 28 | 29 | void leds_init(void) 30 | { 31 | GPIO_LED_CONFIG(ADVERTISING_LED_PIN_NO); 32 | GPIO_LED_CONFIG(CONNECTED_LED_PIN_NO); 33 | GPIO_LED_CONFIG(ASSERT_LED_PIN_NO); 34 | GPIO_LED_CONFIG(GZLL_TX_SUCCESS_LED_PIN_NO); 35 | GPIO_LED_CONFIG(GZLL_TX_FAIL_LED_PIN_NO); 36 | } 37 | 38 | 39 | /**@brief Button event handler. 40 | * 41 | * @param[in] pin_no The pin number of the button pressed. 42 | */ 43 | static void button_event_handler(uint8_t pin_no) 44 | { 45 | switch (pin_no) 46 | { 47 | case BLE_BUTTON_PIN_NO: 48 | running_mode = BLE; 49 | break; 50 | 51 | case GZLL_BUTTON_PIN_NO: 52 | running_mode = GAZELL; 53 | break; 54 | 55 | default: 56 | APP_ERROR_HANDLER(pin_no); 57 | } 58 | } 59 | 60 | 61 | /**@brief Initialize button handler module. 62 | */ 63 | void buttons_init(void) 64 | { 65 | uint32_t err_code; 66 | 67 | // Configure buttons 68 | static app_button_cfg_t buttons[] = 69 | { 70 | {BLE_BUTTON_PIN_NO, false, NRF_GPIO_PIN_NOPULL, button_event_handler}, 71 | {GZLL_BUTTON_PIN_NO, false, NRF_GPIO_PIN_NOPULL, button_event_handler} 72 | }; 73 | 74 | APP_BUTTON_INIT(buttons, sizeof(buttons) / sizeof(buttons[0]), BUTTON_DETECTION_DELAY, false); 75 | 76 | // Start handling button presses immediately 77 | err_code = app_button_enable(); 78 | APP_ERROR_CHECK(err_code); 79 | } 80 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_gzll/ble_app_gzll_ui.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * 15 | * @defgroup ble_sdk_app_gzll_ui Multiprotocol Application User Interface 16 | * @{ 17 | * @ingroup ble_sdk_app_gzll 18 | * @brief User Interface (buttons and LED) handling for the multiprotocol application 19 | */ 20 | 21 | #ifndef BLE_APP_GZLL_UI_H__ 22 | #define BLE_APP_GZLL_UI_H__ 23 | 24 | #include 25 | #include "ble_nrf6310_pins.h" 26 | 27 | #define BLE_BUTTON_PIN_NO NRF6310_BUTTON_0 /**< Button used for switching to Bluetooth Heart Rate example. */ 28 | #define GZLL_BUTTON_PIN_NO NRF6310_BUTTON_1 /**< Button used for switching to Gazell example. */ 29 | #define GZLL_TX_SUCCESS_LED_PIN_NO NRF6310_LED_2 /**< LED used to show successull Transmits.*/ 30 | #define GZLL_TX_FAIL_LED_PIN_NO NRF6310_LED_3 /**< LED used to show failed Transmits.*/ 31 | 32 | /**@brief Initialize GPIOTE module for detecting buttons. 33 | */ 34 | void buttons_init(void); 35 | 36 | /**@brief LEDs initialization. 37 | * 38 | * @details Initializes all LEDs used by the application. 39 | */ 40 | void leds_init(void); 41 | 42 | #endif // BLE_APP_GZLL_UI_H__ 43 | /** @} */ 44 | 45 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_hids_keyboard/arm/ble_app_hids_keyboard.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_hids_keyboard/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_proximity_bondmngr_cfg Proximity Bond Manager Configuration 18 | * @{ 19 | * @ingroup ble_sdk_app_proximity 20 | * @brief Definition of bond manager configurable parameters 21 | */ 22 | 23 | #ifndef BLE_BONDMNGR_CFG_H__ 24 | #define BLE_BONDMNGR_CFG_H__ 25 | 26 | /**@brief Number of CCCDs used in the proximity application. */ 27 | #define BLE_BONDMNGR_CCCD_COUNT 3 28 | 29 | /**@brief Maximum number of bonded masters. */ 30 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 4 31 | 32 | #endif // BLE_BONDMNGR_CFG_H__ 33 | 34 | /** @} */ 35 | /** @endcond */ 36 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_hids_mouse/arm/ble_app_hids_mouse.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_hids_mouse/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_proximity_bondmngr_cfg Proximity Bond Manager Configuration 18 | * @{ 19 | * @ingroup ble_sdk_app_proximity 20 | * @brief Definition of bond manager configurable parameters 21 | */ 22 | 23 | #ifndef BLE_BONDMNGR_CFG_H__ 24 | #define BLE_BONDMNGR_CFG_H__ 25 | 26 | /**@brief Number of CCCDs used in the proximity application. */ 27 | #define BLE_BONDMNGR_CCCD_COUNT 5 28 | 29 | /**@brief Maximum number of bonded masters. */ 30 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 4 31 | 32 | #endif // BLE_BONDMNGR_CFG_H__ 33 | 34 | /** @} */ 35 | /** @endcond */ 36 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_hrs/arm/ble_app_hrs.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_hrs/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_proximity_bondmngr_cfg Proximity Bond Manager Configuration 18 | * @{ 19 | * @ingroup ble_sdk_app_proximity 20 | * @brief Definition of bond manager configurable parameters 21 | */ 22 | 23 | #ifndef BLE_BONDMNGR_CFG_H__ 24 | #define BLE_BONDMNGR_CFG_H__ 25 | 26 | /**@brief Number of CCCDs used in the proximity application. */ 27 | #define BLE_BONDMNGR_CCCD_COUNT 2 28 | 29 | /**@brief Maximum number of bonded masters. */ 30 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 7 31 | 32 | #endif // BLE_BONDMNGR_CFG_H__ 33 | 34 | /** @} */ 35 | /** @endcond */ 36 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_hts/arm/ble_app_hts.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_hts/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | * $LastChangedRevision$ 12 | */ 13 | 14 | /** @cond To make doxygen skip this file */ 15 | 16 | /** @file 17 | * 18 | * @defgroup ble_sdk_app_cscs_bondmngr_cfg CSCS Bond Manager Configuration 19 | * @{ 20 | * @ingroup ble_sdk_app_cscs 21 | * @brief Definition of bond manager configurable parameters 22 | */ 23 | 24 | #ifndef BLE_BONDMNGR_CFG_H__ 25 | #define BLE_BONDMNGR_CFG_H__ 26 | 27 | /**@brief Number of CCCDs used in the CSCS application. */ 28 | #define BLE_BONDMNGR_CCCD_COUNT 2 29 | 30 | /**@brief Maximum number of bonded masters. */ 31 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 4 32 | 33 | #endif // BLE_BONDMNGR_CFG_H__ 34 | 35 | /** @} */ 36 | /** @endcond */ 37 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_proximity/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_proximity_bondmngr_cfg Proximity Bond Manager Configuration 18 | * @{ 19 | * @ingroup ble_sdk_app_proximity 20 | * @brief Definition of bond manager configurable parameters 21 | */ 22 | 23 | #ifndef BLE_BONDMNGR_CFG_H__ 24 | #define BLE_BONDMNGR_CFG_H__ 25 | 26 | /**@brief Number of CCCDs used in the proximity application. */ 27 | #define BLE_BONDMNGR_CCCD_COUNT 1 28 | 29 | /**@brief Maximum number of bonded masters. */ 30 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 7 31 | 32 | #endif // BLE_BONDMNGR_CFG_H__ 33 | 34 | /** @} */ 35 | /** @endcond */ 36 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_proximity/findMeMasterServer.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/finnurtorfa/nrf51/910361df704b814e61687630408300924e16ed20/lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_proximity/findMeMasterServer.bin -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_pwr_profiling/arm/ble_app_pwr_profiling.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_rscs/arm/ble_app_rscs.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_rscs/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_rscs_bondmngr_cfg RSCS Bond Manager Configuration 18 | * @{ 19 | * @ingroup ble_sdk_app_rscs 20 | * @brief Definition of bond manager configurable parameters 21 | */ 22 | 23 | #ifndef BLE_BONDMNGR_CFG_H__ 24 | #define BLE_BONDMNGR_CFG_H__ 25 | 26 | /**@brief Number of CCCDs used in the RSCS application. */ 27 | #define BLE_BONDMNGR_CCCD_COUNT 2 28 | 29 | /**@brief Maximum number of bonded masters. */ 30 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 4 31 | 32 | #endif // BLE_BONDMNGR_CFG_H__ 33 | 34 | /** @} */ 35 | /** @endcond */ 36 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ble/ble_app_template/arm/ble_app_template.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/blinky_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += nrf_delay.c 5 | 6 | 7 | SDK_PATH = ../../../../ 8 | OUTPUT_FILENAME := blinky_gcc 9 | 10 | DEVICE_VARIANT := xxaa 11 | #DEVICE_VARIANT := xxab 12 | 13 | #USE_SOFTDEVICE := S110 14 | #USE_SOFTDEVICE := S210 15 | 16 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 17 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/blinky_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/blinky_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/blinky_example/main.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * @brief Example project on GPIO usage to drive LEDs 15 | * @defgroup gpio_example GPIO example 16 | * @{ 17 | * @ingroup nrf_examples_nrf6310 18 | * 19 | * @brief Example of GPIO output usage. 20 | * 21 | * This example shows how to configure GPIO pins as outputs which can also be used to drive LEDs. 22 | * Each LED is set on one at a time and each state lasts 100 milliseconds. 23 | * @image html example_board_setup_a.png "Use setup A when using the nrf6310 board for this example." 24 | */ 25 | 26 | #include 27 | #include 28 | #include "nrf_delay.h" 29 | #include "nrf_gpio.h" 30 | #include "boards.h" 31 | 32 | /** 33 | * main() function 34 | * @return 0. int return type required by ANSI/ISO standard. 35 | */ 36 | int main(void) 37 | { 38 | uint8_t output_state = 0; 39 | 40 | // Configure LED-pins as outputs 41 | nrf_gpio_range_cfg_output(LED_START, LED_STOP); 42 | 43 | while(true) 44 | { 45 | nrf_gpio_port_write(LED_PORT, 1 << (output_state + LED_OFFSET)); 46 | output_state = (output_state + 1) & BLINKY_STATE_MASK; 47 | nrf_delay_ms(100); 48 | } 49 | } 50 | 51 | /** 52 | *@} 53 | **/ 54 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/debouncer_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += lib_debounce.c 5 | 6 | SDK_PATH = ../../../../ 7 | OUTPUT_FILENAME := debouncer_example_gcc 8 | 9 | 10 | #Uncomment correct line if you have softdevice programmed on the chip. 11 | DEVICE_VARIANT := xxaa 12 | #DEVICE_VARIANT := xxab 13 | 14 | #USE_SOFTDEVICE := S110 15 | #USE_SOFTDEVICE := S210 16 | 17 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/debouncer_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/debouncer_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/debouncer_example/lib_debounce.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #include "lib_debounce.h" 13 | 14 | void debounce_init(deb_t *deb, uint_fast8_t debounce_time_in_ms, uint_fast8_t input_sampling_freq_in_hz) 15 | { 16 | deb->integrator_state = 0U; 17 | deb->output_state = 0U; 18 | deb->debounce_time_in_ms = debounce_time_in_ms; 19 | deb->input_sampling_freq_in_hz = input_sampling_freq_in_hz; 20 | deb->integrator_max_value = (uint_fast8_t)((uint_least16_t)debounce_time_in_ms * (uint_least16_t)input_sampling_freq_in_hz / 1000U); 21 | } 22 | 23 | void debounce(uint_fast8_t input, deb_t *deb) 24 | { 25 | if (input == 0) 26 | { 27 | if (deb->integrator_state > 0) 28 | { 29 | deb->integrator_state--; 30 | } 31 | } 32 | else if (deb->integrator_state < deb->integrator_max_value) 33 | { 34 | deb->integrator_state++; 35 | } 36 | 37 | if (deb->integrator_state == 0) 38 | { 39 | deb->output_state = 0; 40 | } 41 | else if (deb->integrator_state >= deb->integrator_max_value) 42 | { 43 | deb->output_state = 1; 44 | deb->integrator_state = deb->integrator_max_value; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/debouncer_example/lib_debounce.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef LIB_DEBOUNCE_H 13 | #define LIB_DEBOUNCE_H 14 | 15 | #include 16 | 17 | /** \brief Debouncer state */ 18 | typedef struct 19 | { 20 | uint_fast8_t integrator_state; //!< Integrator state 21 | uint_fast8_t output_state; //!< Output state 22 | uint_fast8_t debounce_time_in_ms; //!< How long a button is debounced in milliseconds. 23 | uint_fast8_t input_sampling_freq_in_hz; //!< Debouncer button sampling frequency in Hertz. 24 | uint_fast8_t integrator_max_value; //!< Integrator max value 25 | } deb_t; 26 | 27 | /** \brief Debouncer state init 28 | \param[out] deb Struct to init 29 | \param[in] debounce_time_in_ms Period of debounce time in milliseconds 30 | \param[in] input_sampling_freq_in_hz Button input sampling frequency in hertz 31 | */ 32 | void debounce_init(deb_t *deb, uint_fast8_t debounce_time_in_ms, uint_fast8_t input_sampling_freq_in_hz); 33 | 34 | /** \brief Debouncer button 35 | \param[in] input Input sample 36 | \param[out] deb Debounce struct to update 37 | */ 38 | void debounce(uint_fast8_t input, deb_t *deb); 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ext_sensors/adns2080_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += adns2080.c 5 | C_SOURCE_FILES += sdio.c 6 | C_SOURCE_FILES += nrf_delay.c 7 | 8 | OUTPUT_FILENAME := adns2080_example_gcc 9 | SDK_PATH = ../../../../../ 10 | 11 | 12 | #Uncomment correct line if you have softdevice programmed on the chip. 13 | DEVICE_VARIANT := xxaa 14 | #DEVICE_VARIANT := xxab 15 | 16 | #USE_SOFTDEVICE := S110 17 | #USE_SOFTDEVICE := S210 18 | 19 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 20 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ext_sensors/adns2080_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ext_sensors/adns2080_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ext_sensors/adns2080_example/sdio_config.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef SDIO_CONFIG_H 13 | #define SDIO_CONFIG_H 14 | 15 | #define SDIO_CONFIG_CLOCK_PIN_NUMBER 24 16 | #define SDIO_CONFIG_DATA_PIN_NUMBER 25 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ext_sensors/cherry8x16_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += cherry8x16.c 5 | C_SOURCE_FILES += simple_uart.c 6 | C_SOURCE_FILES += nrf_delay.c 7 | 8 | OUTPUT_FILENAME := cherry8x16_example_gcc 9 | SDK_PATH = ../../../../../ 10 | 11 | 12 | #Uncomment correct line if you have softdevice programmed on the chip. 13 | DEVICE_VARIANT := xxaa 14 | #DEVICE_VARIANT := xxab 15 | 16 | #USE_SOFTDEVICE := S110 17 | #USE_SOFTDEVICE := S210 18 | 19 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 20 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ext_sensors/cherry8x16_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ext_sensors/cherry8x16_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/flashwrite_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | 5 | OUTPUT_FILENAME := flashwrite_example_gcc 6 | SDK_PATH = ../../../../ 7 | 8 | 9 | #Uncomment correct line if you have softdevice programmed on the chip. 10 | DEVICE_VARIANT := xxaa 11 | #DEVICE_VARIANT := xxab 12 | 13 | #USE_SOFTDEVICE := S110 14 | #USE_SOFTDEVICE := S210 15 | 16 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 17 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/flashwrite_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/flashwrite_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/gpiote_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += ../main.c 4 | 5 | OUTPUT_FILENAME := gpiote_example_gcc 6 | SDK_PATH = ../../../../ 7 | 8 | 9 | #Uncomment correct line if you have softdevice programmed on the chip. 10 | DEVICE_VARIANT := xxaa 11 | #DEVICE_VARIANT := xxab 12 | 13 | #USE_SOFTDEVICE := S110 14 | #USE_SOFTDEVICE := S210 15 | 16 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 17 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/gpiote_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/gpiote_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/gzll/gzp_desktop_emulator/keyboard_emulator.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | * $LastCdefinehangedRevision: 2555 $ 12 | */ 13 | 14 | /** 15 | * @file 16 | * @brief Implementation of keyboard_emulate.h . 17 | */ 18 | 19 | #include "keyboard_emulator.h" 20 | 21 | void keyboard_get_non_empty_packet(uint8_t * out_keyboard_packet) 22 | { 23 | uint_least8_t i; 24 | 25 | out_keyboard_packet[NRFR_KEYBOARD_MOD] = 0; 26 | 27 | out_keyboard_packet[NRFR_KEYBOARD_KEYS] = 0x04; // Keyboard 'a' 28 | 29 | for(i = NRFR_KEYBOARD_KEYS + 1; i < NRFR_KEYBOARD_PACKET_LENGTH; i++) 30 | { 31 | out_keyboard_packet[i] = 0; 32 | } 33 | } 34 | 35 | void keyboard_get_empty_packet(uint8_t * out_keyboard_packet) 36 | { 37 | uint_least8_t i; 38 | 39 | out_keyboard_packet[NRFR_KEYBOARD_MOD] = 0; 40 | 41 | for(i = NRFR_KEYBOARD_KEYS; i < NRFR_KEYBOARD_PACKET_LENGTH; i++) 42 | { 43 | out_keyboard_packet[i] = 0; 44 | } 45 | } 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/gzll/gzp_desktop_emulator/keyboard_emulator.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | * $LastChangedRevision: 15516 $ 12 | */ 13 | 14 | #ifndef __NRF_KEYBOARD_H 15 | #define __NRF_KEYBOARD_H 16 | 17 | 18 | /** 19 | * @file 20 | * @brief Keyboard Emulator API 21 | */ 22 | 23 | /** 24 | * @defgroup gzp_keyboard_emulator Keyboard Emulator 25 | * @{ 26 | * @ingroup gzp_desktop_device_emulator_example 27 | */ 28 | 29 | #include "nrf.h" 30 | #include "nrf_gzllde_params.h" 31 | #include 32 | #include 33 | 34 | /** 35 | * @brief keyboard_get_non_empty_packet returns a keyboard packet 36 | * where the 'a' key is pressed. 37 | * 38 | * The total length of the keyboard packet is given by 39 | * NRFR_KEYBOARD_PACKET_LENGTH. 40 | * 41 | * @param out_keyboard_packet is the pointer in which to return the packet 42 | */ 43 | void keyboard_get_non_empty_packet(uint8_t* out_keyboard_packet); 44 | 45 | /** 46 | * @brief keyboard_get_empty_packet returns a keyboard packet 47 | * where the no keys are pressed. 48 | * 49 | * The total length of the keyboard packet is given by 50 | * NRFR_KEYBOARD_PACKET_LENGTH. 51 | * 52 | * @param out_keyboard_packet is the pointer in which to return the packet 53 | */ 54 | void keyboard_get_empty_packet(uint8_t* out_keyboard_packet); 55 | 56 | /** @} */ 57 | #endif 58 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/nRF6350_radio_configuration_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += nRF6350.c 5 | C_SOURCE_FILES += twi_hw_master.c 6 | 7 | OUTPUT_FILENAME := nRF6350_radio_configuration_example_gcc 8 | SDK_PATH = ../../../../ 9 | 10 | 11 | #Uncomment correct line if you have softdevice programmed on the chip. 12 | DEVICE_VARIANT := xxaa 13 | #DEVICE_VARIANT := xxab 14 | 15 | #USE_SOFTDEVICE := S110 16 | #USE_SOFTDEVICE := S210 17 | 18 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 19 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/nRF6350_radio_configuration_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/nRF6350_radio_configuration_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/nRF6350_radio_configuration_example/twi_master_config.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #ifndef TWI_MASTER_CONFIG 14 | #define TWI_MASTER_CONFIG 15 | 16 | #define TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER (24U) 17 | #define TWI_MASTER_CONFIG_DATA_PIN_NUMBER (25U) 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/pin_change_int_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += simple_uart.c 5 | 6 | OUTPUT_FILENAME := pin_change_int_example_gcc 7 | SDK_PATH = ../../../../ 8 | 9 | 10 | #Uncomment correct line if you have softdevice programmed on the chip. 11 | DEVICE_VARIANT := xxaa 12 | #DEVICE_VARIANT := xxab 13 | 14 | #USE_SOFTDEVICE := S110 15 | #USE_SOFTDEVICE := S210 16 | 17 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/pin_change_int_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/pin_change_int_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/pin_change_int_example/main.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * @brief Pin change interrupt example 15 | * @defgroup pin_change_int_example Pin change usage example 16 | * @{ 17 | * @ingroup nrf_examples_nrf6310 18 | * 19 | * @brief Pin change interrupt example 20 | * 21 | * This example demonstrates interrupt on pin change on pin 0. Pin8 is configured 22 | * as output and toggled in the pin change interrupt handler. 23 | * 24 | * @image html example_board_setup_a.png "Use board setup A for this example." 25 | */ 26 | 27 | #include 28 | #include "nrf.h" 29 | #include "nrf_gpio.h" 30 | 31 | /** 32 | * Configures pin 0 for input and pin 8 for output and 33 | * configures GPIOTE to give interrupt on pin change. 34 | */ 35 | static void gpio_init(void) 36 | { 37 | *(uint32_t *)0x40000504 = 0xC007FFDF; // Workaround for PAN_028 rev1.1 anomaly 23 - System: Manual setup is required to enable use of peripherals 38 | 39 | nrf_gpio_cfg_input(0, NRF_GPIO_PIN_NOPULL); 40 | nrf_gpio_cfg_output(8); 41 | 42 | nrf_gpio_pin_write(8, 0); 43 | 44 | // Enable interrupt: 45 | NVIC_EnableIRQ(GPIOTE_IRQn); 46 | NRF_GPIOTE->CONFIG[0] = (GPIOTE_CONFIG_POLARITY_Toggle << GPIOTE_CONFIG_POLARITY_Pos) 47 | | (0 << GPIOTE_CONFIG_PSEL_Pos) 48 | | (GPIOTE_CONFIG_MODE_Event << GPIOTE_CONFIG_MODE_Pos); 49 | NRF_GPIOTE->INTENSET = GPIOTE_INTENSET_IN0_Set << GPIOTE_INTENSET_IN0_Pos; 50 | } 51 | 52 | /** GPIOTE interrupt handler. 53 | * Triggered on pin 0 change 54 | */ 55 | void GPIOTE_IRQHandler(void) 56 | { 57 | // Event causing the interrupt must be cleared 58 | if ((NRF_GPIOTE->EVENTS_IN[0] == 1) && (NRF_GPIOTE->INTENSET & GPIOTE_INTENSET_IN0_Msk)) 59 | { 60 | NRF_GPIOTE->EVENTS_IN[0] = 0; 61 | } 62 | nrf_gpio_pin_toggle(8); 63 | } 64 | 65 | /** 66 | * main function 67 | * \return 0. int return type required by ANSI/ISO standard. 68 | */ 69 | int main(void) 70 | { 71 | gpio_init(); 72 | while (true) 73 | { 74 | } 75 | } 76 | 77 | /** 78 | *@} 79 | **/ 80 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ppi_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += nrf_delay.c 5 | 6 | OUTPUT_FILENAME := ppi_example_gcc 7 | SDK_PATH = ../../../../ 8 | 9 | 10 | #Uncomment correct line if you have softdevice programmed on the chip. 11 | DEVICE_VARIANT := xxaa 12 | #DEVICE_VARIANT := xxab 13 | 14 | #USE_SOFTDEVICE := S110 15 | #USE_SOFTDEVICE := S210 16 | 17 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ppi_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ppi_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/pwm_analyzer/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | 5 | OUTPUT_FILENAME := pwm_analyzer_gcc 6 | 7 | SDK_PATH = ../../../../ 8 | 9 | 10 | #Uncomment correct line if you have softdevice programmed on the chip. 11 | DEVICE_VARIANT := xxaa 12 | #DEVICE_VARIANT := xxab 13 | 14 | #USE_SOFTDEVICE := S110 15 | #USE_SOFTDEVICE := S210 16 | 17 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/pwm_analyzer/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/pwm_analyzer/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/pwm_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | 5 | OUTPUT_FILENAME := pwm_example_gcc 6 | SDK_PATH = ../../../../ 7 | 8 | 9 | #Uncomment correct line if you have softdevice programmed on the chip. 10 | DEVICE_VARIANT := xxaa 11 | #DEVICE_VARIANT := xxab 12 | 13 | #USE_SOFTDEVICE := S110 14 | #USE_SOFTDEVICE := S210 15 | 16 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 17 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/pwm_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/pwm_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/radio_example/gcc_rx/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main_rx.c 4 | C_SOURCE_FILES += radio_config.c 5 | C_SOURCE_FILES += nrf_delay.c 6 | 7 | OUTPUT_FILENAME := radio_rx_example_gcc 8 | SDK_PATH = ../../../../ 9 | 10 | 11 | #Uncomment correct line if you have softdevice programmed on the chip. 12 | DEVICE_VARIANT := xxaa 13 | #DEVICE_VARIANT := xxab 14 | 15 | #USE_SOFTDEVICE := S110 16 | #USE_SOFTDEVICE := S210 17 | 18 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 19 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/radio_example/gcc_rx/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/radio_example/gcc_rx/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/radio_example/gcc_tx/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main_tx.c 4 | C_SOURCE_FILES += radio_config.c 5 | C_SOURCE_FILES += nrf_delay.c 6 | 7 | OUTPUT_FILENAME := radio_tx_example_gcc 8 | SDK_PATH = ../../../../ 9 | 10 | 11 | #Uncomment correct line if you have softdevice programmed on the chip. 12 | DEVICE_VARIANT := xxaa 13 | #DEVICE_VARIANT := xxab 14 | 15 | #USE_SOFTDEVICE := S110 16 | #USE_SOFTDEVICE := S210 17 | 18 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 19 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/radio_example/gcc_tx/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/radio_example/gcc_tx/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/radio_example/radio_config.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef RADIO_CONFIG_H 13 | #define RADIO_CONFIG_H 14 | 15 | #define PACKET_BASE_ADDRESS_LENGTH (4UL) //!< Packet base address length field size in bytes 16 | #define PACKET_STATIC_LENGTH (1UL) //!< Packet static length in bytes 17 | #define PACKET_PAYLOAD_MAXSIZE (PACKET_STATIC_LENGTH) //!< Packet payload maximum size in bytes 18 | 19 | void radio_configure(void); 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/radio_test_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += radio_test.c 5 | C_SOURCE_FILES += uart.c 6 | 7 | OUTPUT_FILENAME := radio_test_example_gcc 8 | SDK_PATH = ../../../../ 9 | 10 | 11 | #Uncomment correct line if you have softdevice programmed on the chip. 12 | DEVICE_VARIANT := xxaa 13 | #DEVICE_VARIANT := xxab 14 | 15 | #USE_SOFTDEVICE := S110 16 | #USE_SOFTDEVICE := S210 17 | 18 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 19 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/radio_test_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/radio_test_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/radio_test_example/radio_test.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef RADIO_TEST_H 13 | #define RADIO_TEST_H 14 | 15 | void radio_tx_carrier(uint8_t txpower, uint8_t mode, uint8_t channel); 16 | void radio_modulated_tx_carrier(uint8_t txpower, uint8_t mode, uint8_t channel); 17 | void radio_rx_carrier(uint8_t mode, uint8_t channel); 18 | void radio_tx_sweep_start(uint8_t txpower, uint8_t mode, uint8_t channel_start, uint8_t channel_end, uint8_t delayms); 19 | void radio_rx_sweep_start(uint8_t mode, uint8_t channel_start, uint8_t channel_end, uint8_t delayms); 20 | void radio_sweep_end(void); 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/radio_test_example/uart.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | */ 11 | 12 | #include "nrf.h" 13 | #include "uart.h" 14 | #include "nrf_gpio.h" 15 | 16 | #define BUFFER_LENGTH 16 17 | 18 | static volatile uint8_t rx_buffer[BUFFER_LENGTH]; 19 | static volatile uint8_t rxwp, rxrp, nrx; 20 | 21 | void uart_put(uint8_t cr) 22 | { 23 | NRF_UART0->TXD = cr; 24 | while(NRF_UART0->EVENTS_TXDRDY!=1) 25 | ; 26 | NRF_UART0->EVENTS_TXDRDY=0; 27 | } 28 | 29 | uint8_t uart_get(void) 30 | { 31 | while(nrx == 0) 32 | ; 33 | nrx--; 34 | uint8_t tmp = rx_buffer[rxrp]; 35 | rxrp = (rxrp + 1) & (BUFFER_LENGTH - 1); 36 | return tmp; 37 | } 38 | 39 | void uart_config(uint8_t txd_pin_number, uint8_t rxd_pin_number) 40 | { 41 | rxwp = rxrp = nrx = 0; 42 | 43 | nrf_gpio_cfg_output(txd_pin_number); 44 | nrf_gpio_cfg_input(rxd_pin_number, NRF_GPIO_PIN_NOPULL); 45 | 46 | NRF_UART0->PSELTXD = txd_pin_number; 47 | NRF_UART0->PSELRXD = rxd_pin_number; 48 | 49 | NRF_UART0->BAUDRATE = (UART_BAUDRATE_BAUDRATE_Baud38400 << UART_BAUDRATE_BAUDRATE_Pos); 50 | NRF_UART0->ENABLE = (UART_ENABLE_ENABLE_Enabled << UART_ENABLE_ENABLE_Pos); 51 | NRF_UART0->TASKS_STARTTX = 1; 52 | NRF_UART0->TASKS_STARTRX = 1; 53 | NRF_UART0->EVENTS_RXDRDY = 0; 54 | 55 | NRF_UART0->INTENSET |= (UART_INTENSET_RXDRDY_Enabled << UART_INTENSET_RXDRDY_Pos ); 56 | 57 | NVIC_EnableIRQ(UART0_IRQn); 58 | } 59 | 60 | void uart_putstring(const uint8_t* str) 61 | { 62 | while(*str) 63 | { 64 | uart_put(*str++); 65 | } 66 | } 67 | 68 | void UART0_IRQHandler(void) 69 | { 70 | if (nrx > BUFFER_LENGTH) 71 | { 72 | uart_putstring((const uint8_t *)"BUFFER_OVERFLOW"); 73 | while(1); 74 | } 75 | nrx++; 76 | rx_buffer[rxwp] = NRF_UART0->RXD; 77 | rxwp = (rxwp + 1) & (BUFFER_LENGTH - 1); 78 | NRF_UART0->EVENTS_RXDRDY = 0; 79 | } 80 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/radio_test_example/uart.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #ifndef UART_H 14 | #define UART_H 15 | 16 | /** Reads a character from UART. 17 | Execution is blocked until UART peripheral detects character has been received. 18 | \return cr Received character. 19 | */ 20 | uint8_t uart_get(void); 21 | 22 | 23 | /** Sends a character to UART. 24 | Execution is blocked until UART peripheral reports character to have been send. 25 | @param cr Character to send. 26 | */ 27 | void uart_put(uint8_t cr); 28 | 29 | /** Sends a string to UART. 30 | Execution is blocked until UART peripheral reports all characters to have been send. 31 | Maximum string length is 254 characters including null character in the end. 32 | @param str Null terminated string to send. 33 | */ 34 | void uart_putstring(const uint8_t *str); 35 | 36 | /** Configures UART to use 38400 baud rate. 37 | @param txd_pin_number Chip pin number to be used for UART TXD 38 | @param rxd_pin_number Chip pin number to be used for UART RXD 39 | */ 40 | void uart_config(uint8_t txd_pin_number, uint8_t rxd_pin_number); 41 | 42 | #endif 43 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ram_retention_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += nrf_delay.c 5 | 6 | OUTPUT_FILENAME := ram_retention_example_gcc 7 | SDK_PATH = ../../../../ 8 | 9 | 10 | #Uncomment correct line if you have softdevice programmed on the chip. 11 | DEVICE_VARIANT := xxaa 12 | #DEVICE_VARIANT := xxab 13 | 14 | #USE_SOFTDEVICE := S110 15 | #USE_SOFTDEVICE := S210 16 | 17 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ram_retention_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/ram_retention_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/rng_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += nrf_delay.c 5 | 6 | OUTPUT_FILENAME := rng_example_gcc 7 | SDK_PATH = ../../../../ 8 | 9 | 10 | #Uncomment correct line if you have softdevice programmed on the chip. 11 | DEVICE_VARIANT := xxaa 12 | #DEVICE_VARIANT := xxab 13 | 14 | #USE_SOFTDEVICE := S110 15 | #USE_SOFTDEVICE := S210 16 | 17 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/rng_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/rng_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/rng_example/main.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * @brief Random Number Generator 15 | * @defgroup rng_example Random Number Generator example 16 | * @{ 17 | * @ingroup nrf_examples_nrf6310 18 | * 19 | * @brief This example generates random numbers from RNG peripheral and shows them on LEDs. 20 | * @image html example_board_setup_a.png "Use board setup A for this example." 21 | */ 22 | 23 | #include 24 | #include 25 | #include "nrf_delay.h" 26 | #include "nrf_gpio.h" 27 | 28 | 29 | /** 30 | * main function 31 | * @return 0. int return type required by ANSI/ISO standard. 32 | */ 33 | int main(void) 34 | { 35 | // Configure pins 8-15 (port1) for LEDs as outputs 36 | nrf_gpio_range_cfg_output(8, 15); 37 | 38 | nrf_gpio_port_set(NRF_GPIO_PORT_SELECT_PORT1, 0XFF); 39 | 40 | NRF_RNG->TASKS_START = 1; // start RNG 41 | while (true) 42 | { 43 | // Clear the VALRDY EVENT and clear gpio8 - 15 (port1) 44 | NRF_RNG->EVENTS_VALRDY = 0; 45 | 46 | // Wait until the value ready event is generated 47 | while ( NRF_RNG->EVENTS_VALRDY == 0){} 48 | 49 | // Set output according to the random value 50 | nrf_gpio_port_write(NRF_GPIO_PORT_SELECT_PORT1, (uint8_t)NRF_RNG->VALUE); 51 | 52 | nrf_delay_ms(100); 53 | } 54 | } 55 | 56 | 57 | /** 58 | *@} 59 | **/ 60 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/rtc_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += simple_uart.c 5 | 6 | OUTPUT_FILENAME := rtc_example_gcc 7 | SDK_PATH = ../../../../ 8 | 9 | 10 | #Uncomment correct line if you have softdevice programmed on the chip. 11 | DEVICE_VARIANT := xxaa 12 | #DEVICE_VARIANT := xxab 13 | 14 | #USE_SOFTDEVICE := S110 15 | #USE_SOFTDEVICE := S210 16 | 17 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/rtc_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/rtc_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/simple_pwm_motor_control_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += nrf_delay.c 5 | 6 | OUTPUT_FILENAME := simple_pwm_motor_control_example_gcc 7 | SDK_PATH = ../../../../ 8 | 9 | 10 | #Uncomment correct line if you have softdevice programmed on the chip. 11 | DEVICE_VARIANT := xxaa 12 | #DEVICE_VARIANT := xxab 13 | 14 | #USE_SOFTDEVICE := S110 15 | #USE_SOFTDEVICE := S210 16 | 17 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/simple_pwm_motor_control_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/simple_pwm_motor_control_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/spi_master_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += spi_master.c 5 | C_SOURCE_FILES += nrf_delay.c 6 | 7 | OUTPUT_FILENAME := spi_master_example_gcc 8 | SDK_PATH = ../../../../ 9 | 10 | 11 | #Uncomment correct line if you have softdevice programmed on the chip. 12 | DEVICE_VARIANT := xxaa 13 | #DEVICE_VARIANT := xxab 14 | 15 | #USE_SOFTDEVICE := S110 16 | #USE_SOFTDEVICE := S210 17 | 18 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 19 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/spi_master_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/spi_master_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/temperature_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += nrf_delay.c 5 | C_SOURCE_FILES += simple_uart.c 6 | 7 | OUTPUT_FILENAME := temperature_gcc 8 | SDK_PATH = ../../../../ 9 | 10 | 11 | #Uncomment correct line if you have softdevice programmed on the chip. 12 | DEVICE_VARIANT := xxaa 13 | #DEVICE_VARIANT := xxab 14 | 15 | #USE_SOFTDEVICE := S110 16 | #USE_SOFTDEVICE := S210 17 | 18 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 19 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/temperature_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/temperature_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/temperature_example/main.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * @brief Example project to use temperature sensor and show the value on LEDs from port1 GPIO 15 | * @defgroup temperature_example Temperature example 16 | * @{ 17 | * @ingroup nrf_examples_nrf6310 18 | * 19 | * @brief Example for using temperature sensor and show the binary value on port1 GPIO, 20 | * @note as port1 has only 8bits only positive temperature is shown 21 | * 22 | * This example shows how to get temperature from temperature sensor 23 | */ 24 | 25 | #include 26 | #include 27 | 28 | #include 29 | #include "nrf.h" 30 | #include "nrf_delay.h" 31 | #include "nrf_temp.h" 32 | #include "nrf_gpio.h" 33 | 34 | /** 35 | * main() function 36 | * @return 0. int return type required by ANSI/ISO standard. 37 | */ 38 | int main(void) 39 | { 40 | // This function contains workaround for PAN_028 rev1.1 anomalies 24,25,26 and 27 41 | 42 | int32_t volatile temp; 43 | 44 | /* Init TEMP peripheral */ 45 | nrf_temp_init(); 46 | 47 | /* Configure pins 8-15 (port 1) as outputs */ 48 | nrf_gpio_range_cfg_output(8, 15); 49 | 50 | while(true) 51 | { 52 | NRF_TEMP->TASKS_START = 1; /* Start the temperature measurement */ 53 | 54 | /* Busy wait while temperature measurement is not finished, you can skip waiting if you enable interrupt for DATARDY event and read the result in the interrupt. */ 55 | /*lint -e{845} // A zero has been given as right argument to operator '|'" */ 56 | while ((NRF_TEMP->EVENTS_DATARDY & TEMP_INTENSET_DATARDY_Msk) != (TEMP_INTENSET_DATARDY_Set << TEMP_INTENSET_DATARDY_Pos)) 57 | { 58 | } 59 | NRF_TEMP->EVENTS_DATARDY = 0; 60 | 61 | temp = (nrf_temp_read()/4); 62 | 63 | NRF_TEMP->TASKS_STOP = 1; /* Stop the temperature measurement */ 64 | 65 | nrf_gpio_port_write(NRF_GPIO_PORT_SELECT_PORT1, (uint8_t)(temp)); 66 | 67 | nrf_delay_ms(500); 68 | } 69 | } 70 | 71 | /** 72 | *@} 73 | **/ 74 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/template_project/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | 5 | OUTPUT_FILENAME := template_project_gcc 6 | SDK_PATH = ../../../../ 7 | 8 | 9 | #Uncomment correct line if you have softdevice programmed on the chip. 10 | DEVICE_VARIANT := xxaa 11 | #DEVICE_VARIANT := xxab 12 | 13 | #USE_SOFTDEVICE := S110 14 | #USE_SOFTDEVICE := S210 15 | 16 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 17 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/template_project/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/template_project/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/template_project/main.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * @brief Example template project. 15 | * @defgroup nrf_templates_example Example template 16 | * @{ 17 | * @ingroup nrf_examples_nrf6310 18 | * 19 | * @brief Example template. 20 | * 21 | */ 22 | 23 | #include 24 | //#include 25 | //#include "nrf.h" 26 | 27 | /** 28 | * main function 29 | * \return 0. int return type required by ANSI/ISO standard. 30 | */ 31 | int main(void) 32 | { 33 | while (true) 34 | { 35 | } 36 | } 37 | 38 | /** 39 | *@} 40 | **/ 41 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/timer_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | 5 | OUTPUT_FILENAME := timer_example_gcc 6 | SDK_PATH = ../../../../ 7 | 8 | 9 | #Uncomment correct line if you have softdevice programmed on the chip. 10 | DEVICE_VARIANT := xxaa 11 | #DEVICE_VARIANT := xxab 12 | 13 | #USE_SOFTDEVICE := S110 14 | #USE_SOFTDEVICE := S210 15 | 16 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 17 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/timer_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/timer_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/twi_sw_master_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += ds1624.c 5 | C_SOURCE_FILES += twi_sw_master.c 6 | C_SOURCE_FILES += synaptics_touchpad.c 7 | 8 | OUTPUT_FILENAME := twi_sw_master_example_gcc 9 | SDK_PATH = ../../../../ 10 | 11 | 12 | #Uncomment correct line if you have softdevice programmed on the chip. 13 | DEVICE_VARIANT := xxaa 14 | #DEVICE_VARIANT := xxab 15 | 16 | #USE_SOFTDEVICE := S110 17 | #USE_SOFTDEVICE := S210 18 | 19 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 20 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/twi_sw_master_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/twi_sw_master_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/twi_sw_master_example/twi_master_config.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef TWI_MASTER_CONFIG 13 | #define TWI_MASTER_CONFIG 14 | 15 | #define TWI_MASTER_CONFIG_CLOCK_PIN_NUMBER (24U) 16 | #define TWI_MASTER_CONFIG_DATA_PIN_NUMBER (25U) 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/uart_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_NRF6310 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += simple_uart.c 5 | 6 | OUTPUT_FILENAME := uart_example_gcc 7 | SDK_PATH = ../../../../ 8 | 9 | 10 | #Uncomment correct line if you have softdevice programmed on the chip. 11 | DEVICE_VARIANT := xxaa 12 | #DEVICE_VARIANT := xxab 13 | 14 | #USE_SOFTDEVICE := S110 15 | #USE_SOFTDEVICE := S210 16 | 17 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/uart_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310/uart_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/ble_s110_serialization/ble/ble_app_advertising/arm/ble_app_advertising.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | 15 | Segger\JL2CM3.dll 16 | 17 | 18 | 19 | 0 20 | JL2CM3 21 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 22 | 23 | 24 | 25 | 26 | 27 | 28 | nrf51822_xxab (128K) 29 | 0x4 30 | ARM-ADS 31 | 32 | 33 | 34 | Segger\JL2CM3.dll 35 | 36 | 37 | 38 | 0 39 | JL2CM3 40 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 41 | 42 | 43 | 44 | 45 |
46 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/ble_s110_serialization/ble/ble_app_connectivity/arm/ble_app_connectivity.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | Segger\JL2CM3.dll 15 | 16 | 17 | 18 | 0 19 | JL2CM3 20 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 21 | 22 | 23 | 24 | 25 | 26 | 27 | nrf51822_xxab_s110 (128K) 28 | 0x4 29 | ARM-ADS 30 | 31 | 32 | Segger\JL2CM3.dll 33 | 34 | 35 | 36 | 0 37 | JL2CM3 38 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 39 | 40 | 41 | 42 | 43 |
44 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/ble_s110_serialization/ble/ble_app_hrs/arm/ble_app_hrs.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa (256K) 7 | 0x4 8 | ARM-ADS 9 | 10 | 11 | 1 12 | 13 | 14 | 15 | 16 | Segger\JL2CM3.dll 17 | 18 | 19 | 20 | 0 21 | JL2CM3 22 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 23 | 24 | 25 | 26 | 27 | 28 | 29 | nrf51822_xxab (128K) 30 | 0x4 31 | ARM-ADS 32 | 33 | 34 | 35 | 36 | Segger\JL2CM3.dll 37 | 38 | 39 | 40 | 0 41 | JL2CM3 42 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 43 | 44 | 45 | 46 | 47 |
48 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/ble_s110_serialization/ble/ble_app_hrs/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_proximity_bondmngr_cfg Proximity Bond Manager Configuration 18 | * @{ 19 | * @ingroup ble_sdk_app_proximity 20 | * @brief Definition of bond manager configurable parameters 21 | */ 22 | 23 | #ifndef BLE_BONDMNGR_CFG_H__ 24 | #define BLE_BONDMNGR_CFG_H__ 25 | 26 | /**@brief Number of CCCDs used in the proximity application. */ 27 | #define BLE_BONDMNGR_CCCD_COUNT 2 28 | 29 | /**@brief Maximum number of bonded masters. */ 30 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 7 31 | 32 | #endif // BLE_BONDMNGR_CFG_H__ 33 | 34 | /** @} */ 35 | /** @endcond */ 36 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/ble_s110_serialization/include/app_common/rpc_transport_internal.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file RPC transport module internal definitions. 14 | * 15 | * @defgroup rpc_transport RPC Transport Module 16 | * @{ 17 | * @ingroup app_common_serialization 18 | * 19 | */ 20 | 21 | #ifndef RPC_TRANSPORT_INTERNAL_H__ 22 | #define RPC_TRANSPORT_INTERNAL_H__ 23 | 24 | #define RPC_LENGTH_FIELD_SIZE 4u /**< Transport frame length field size in bytes. */ 25 | #define RPC_PACKET_TYPE_FIELD_SIZE 4u /**< Transport frame type field size in bytes. */ 26 | #define RPC_HDR_SIZE (RPC_LENGTH_FIELD_SIZE + RPC_PACKET_TYPE_FIELD_SIZE) /**< Transport frame header size in bytes. */ 27 | 28 | #define RPC_TX_BUF_SIZE 256u /**< TX buffer size in number of bytes. */ 29 | #define RPC_RX_BUF_SIZE RPC_TX_BUF_SIZE /**< RX buffer size in number of bytes. */ 30 | 31 | #endif // RPC_TRANSPORT_INTERNAL_H__ 32 | 33 | /** @} */ 34 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/ble_s110_serialization/include/ble/rpc/ble_rpc_cmd_defines.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * 15 | * @defgroup rpc_cmd_defines Defines related to serialized BLE commands. 16 | * @{ 17 | * @ingroup ble_sdk_lib 18 | * 19 | * @brief Defines for serialized BLE commands. 20 | * 21 | */ 22 | 23 | 24 | #ifndef RPC_CMD_DEFINES_H__ 25 | #define RPC_CMD_DEFINES_H__ 26 | 27 | #define RPC_CMD_OP_CODE_POS 0 /**< Position of the Op Code in the command buffer.*/ 28 | #define RPC_CMD_DATA_POS 1 /**< Position of the data in the command buffer.*/ 29 | 30 | #define RPC_MAX_CMD_RSP_LEN 5 /**< Maximum length of the command response packet sent to the transport layer.*/ 31 | #define RPC_MAX_CMD_RSP_DATA_LEN 128 /**< Maximum length of the command response packet with additional data sent to the transport layer.*/ 32 | 33 | #define RPC_CMD_RESP_OP_CODE_POS 0 /**< Position of the Op Code in the command response buffer.*/ 34 | #define RPC_CMD_RESP_STATUS_POS 1 /**< Position of the status field in the command response buffer.*/ 35 | 36 | #define MAX_EVENT_LEN 56 /**< Maximum possible length, in bytes, of an encoded BLE Event. (Must be a multiple of 4, to make sure memory is aligned)*/ 37 | 38 | #endif // RPC_CMD_DEFINES_H__ 39 | 40 | /** @} */ 41 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/ble_s110_serialization/include/ble/rpc/ble_rpc_cmd_encoder.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /**@brief Function for initializing the BLE S110 RPC Command Encoder module. 14 | * 15 | * @return NRF_SUCCESS upon success, any other upon failure. 16 | */ 17 | uint32_t ble_rpc_cmd_encoder_init(void); 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/ble_s110_serialization/include/ble/rpc/ble_rpc_cmd_encoder_internal.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #define RPC_BLE_FIELD_PRESENT 0x01 /**< Value to indicate that an optional field is encoded in the serialized packet, e.g. white list. */ 14 | #define RPC_BLE_FIELD_NOT_PRESENT 0x00 /**< Value to indicate that an optional field is not encoded in the serialized packet. */ 15 | #define RPC_BLE_FIELD_LEN 1u /**< Optional field length size in bytes. */ 16 | 17 | #define BLE_ERR_CODE_SIZE 4u /**< BLE API err_code size in bytes. */ 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/ble_s110_serialization/include/ble/rpc/ble_rpc_event_decoder.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /**@brief Function for initializing the BLE S110 RPC Event Decoder module. 14 | * 15 | * @return NRF_SUCCESS upon success, any other upon failure. 16 | */ 17 | uint32_t ble_rpc_event_decoder_init(void); 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/ble_s110_serialization/include/ble/rpc/ble_rpc_event_encoder.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * 15 | * @defgroup rpc_event_encoder Events Encoder 16 | * @{ 17 | * @ingroup ble_sdk_lib_serialization 18 | * 19 | * @brief Event encoder for S110 SoftDevice serialization. 20 | * 21 | * @details This module provides functions for serializing S110 SoftDevice events. 22 | * 23 | */ 24 | #ifndef RPC_EVENT_ENCODER_H__ 25 | #define RPC_EVENT_ENCODER_H__ 26 | 27 | #include "ble.h" 28 | 29 | /**@brief Encode a ble_evt_t. The function will call the transport layer with the serialized 30 | * byte stream. 31 | * 32 | * @param[in] p_ble_evt S110 SoftDevice event to serialize. 33 | * 34 | */ 35 | void rpc_event_encoder_write(ble_evt_t * p_ble_evt); 36 | 37 | #endif 38 | 39 | /** @} */ 40 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/device_firmware_updates/bootloader/hrs.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/finnurtorfa/nrf51/910361df704b814e61687630408300924e16ed20/lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/device_firmware_updates/bootloader/hrs.bin -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/device_firmware_updates/bootloader/hrs_packet_encoded.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/finnurtorfa/nrf51/910361df704b814e61687630408300924e16ed20/lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/device_firmware_updates/bootloader/hrs_packet_encoded.bin -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/nrf6310_experimental/device_firmware_updates/include/app_common/rpc_transport_internal.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file RPC transport module internal definitions. 14 | * 15 | * @defgroup rpc_transport RPC Transport Module 16 | * @{ 17 | * @ingroup app_common_serialization 18 | * 19 | */ 20 | 21 | #ifndef RPC_TRANSPORT_INTERNAL_H__ 22 | #define RPC_TRANSPORT_INTERNAL_H__ 23 | 24 | #define RPC_LENGTH_FIELD_SIZE 4u /**< Transport frame length field size in bytes. */ 25 | #define RPC_PACKET_TYPE_FIELD_SIZE 4u /**< Transport frame type field size in bytes. */ 26 | #define RPC_HDR_SIZE (RPC_LENGTH_FIELD_SIZE + RPC_PACKET_TYPE_FIELD_SIZE) /**< Transport frame header size in bytes. */ 27 | 28 | #define RPC_TX_BUF_SIZE 256u /**< TX buffer size in number of bytes. */ 29 | #define RPC_RX_BUF_SIZE RPC_TX_BUF_SIZE /**< RX buffer size in number of bytes. */ 30 | 31 | #endif // RPC_TRANSPORT_INTERNAL_H__ 32 | 33 | /** @} */ 34 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10000/button_radio_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_PCA10000 2 | 3 | C_SOURCE_FILES += main_rx.c 4 | C_SOURCE_FILES += radio_config.c 5 | C_SOURCE_FILES += simple_uart.c 6 | C_SOURCE_FILES += nrf_delay.c 7 | 8 | OUTPUT_FILENAME := button_radio_gcc 9 | SDK_PATH = ../../../../ 10 | 11 | 12 | #Uncomment correct line if you have softdevice programmed on the chip. 13 | DEVICE_VARIANT := xxaa 14 | #DEVICE_VARIANT := xxab 15 | 16 | #USE_SOFTDEVICE := S110 17 | #USE_SOFTDEVICE := S210 18 | 19 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 20 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10000/button_radio_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10000/button_radio_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10000/button_radio_example/radio_config.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef RADIO_CONFIG_H 13 | #define RADIO_CONFIG_H 14 | 15 | void radio_configure(void); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10000/led_radio_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_PCA10000 2 | 3 | C_SOURCE_FILES += main_tx.c 4 | C_SOURCE_FILES += radio_config.c 5 | C_SOURCE_FILES += simple_uart.c 6 | C_SOURCE_FILES += nrf_delay.c 7 | 8 | OUTPUT_FILENAME := led_radio_gcc 9 | SDK_PATH = ../../../../ 10 | 11 | 12 | #Uncomment correct line if you have softdevice programmed on the chip. 13 | DEVICE_VARIANT := xxaa 14 | #DEVICE_VARIANT := xxab 15 | 16 | #USE_SOFTDEVICE := S110 17 | #USE_SOFTDEVICE := S210 18 | 19 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 20 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10000/led_radio_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10000/led_radio_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10000/led_radio_example/radio_config.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef RADIO_CONFIG_H 13 | #define RADIO_CONFIG_H 14 | 15 | void radio_configure(void); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10000/uart_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_PCA10000 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += simple_uart.c 5 | 6 | OUTPUT_FILENAME := uart_example_gcc 7 | SDK_PATH = ../../../../ 8 | 9 | 10 | #Uncomment correct line if you have softdevice programmed on the chip. 11 | DEVICE_VARIANT := xxaa 12 | #DEVICE_VARIANT := xxab 13 | 14 | #USE_SOFTDEVICE := S110 15 | #USE_SOFTDEVICE := S210 16 | 17 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10000/uart_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10000/uart_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/ble/ble_app_hrs/arm/ble_app_hrs.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 8 | 0x4 9 | ARM-ADS 10 | 11 | 12 | 1 13 | 14 | 15 | Segger\JL2CM3.dll 16 | 17 | 18 | 19 | 0 20 | JL2CM3 21 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 22 | 23 | 24 | 25 | 26 | 27 | 28 | nrf51822_xxab_s110 (128K) 29 | 30 | 0x4 31 | ARM-ADS 32 | 33 | 34 | Segger\JL2CM3.dll 35 | 36 | 37 | 38 | 0 39 | JL2CM3 40 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 41 | 42 | 43 | 44 | 45 |
46 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/ble/ble_app_hrs/battery.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_hrs_eval_battery Battery Level Hardware Handling 18 | * @{ 19 | * @ingroup ble_sdk_app_hrs_eval 20 | * @brief Battery Level Hardware Handling prototypes 21 | * 22 | */ 23 | 24 | #ifndef BATTERY_H__ 25 | #define BATTERY_H__ 26 | 27 | 28 | /**@brief Function to make the ADC start a battery level conversion 29 | */ 30 | void battery_start(void); 31 | 32 | #endif // BATTERY_H__ 33 | 34 | /** @} */ 35 | /** @endcond */ 36 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/ble/ble_app_hrs/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_gls_bondmngr_cfg GLS Bond Manager Configuration 18 | * @{ 19 | * @ingroup ble_sdk_app_gls 20 | * @brief Definition of bond manager configurable parameters 21 | */ 22 | 23 | #ifndef BLE_BONDMNGR_CFG_H__ 24 | #define BLE_BONDMNGR_CFG_H__ 25 | 26 | /**@brief Number of CCCDs used in the GLS application. */ 27 | #define BLE_BONDMNGR_CCCD_COUNT 2 28 | 29 | /**@brief Maximum number of bonded masters. */ 30 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 7 31 | 32 | #endif // BLE_BONDMNGR_CFG_H__ 33 | 34 | /** @} */ 35 | /** @endcond */ 36 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/ble/ble_app_hrs/led.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_hrs_eval_led LED Handling 18 | * @{ 19 | * @ingroup ble_sdk_app_hrs_eval 20 | * @brief LED Handling prototypes 21 | * 22 | */ 23 | 24 | #ifndef LED_H__ 25 | #define LED_H__ 26 | 27 | 28 | /**@brief Function to start flashing the LED. 29 | * @details This will start the TIMER1 and enable the GPIOTE task that toggles the LED. 30 | * The PPI and GPIOTE configurations done by this app will make this action result in the 31 | * flashing of the LED. 32 | * @pre Can only be called after the SoftDevice is enabled - uses nrf_soc API 33 | */ 34 | void led_start(void); 35 | 36 | /**@brief Function to stop flashing the LED. 37 | * @details This will stop the TIMER1 and disable the GPIOTE task that toggles the LED. 38 | * The PPI and GPIOTE configurations done by this app will 39 | * make this action result in the turning off the LED. 40 | */ 41 | void led_stop(void); 42 | 43 | #endif // LED_H__ 44 | 45 | /** @} */ 46 | /** @endcond */ 47 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/ble/ble_app_hrs/main.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @cond To make doxygen skip this file */ 14 | 15 | /** @file 16 | * 17 | * @defgroup ble_sdk_app_hrs_eval_main Main source file 18 | * @{ 19 | * @ingroup ble_sdk_app_hrs_eval 20 | * @brief Main source file prototypes 21 | * 22 | */ 23 | 24 | #ifndef MAIN_H__ 25 | #define MAIN_H__ 26 | 27 | /**@brief External reference to the Battery Service. */ 28 | extern ble_bas_t bas; 29 | 30 | #endif // MAIN_H__ 31 | 32 | /** @} */ 33 | /** @endcond */ 34 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/ble/ble_app_proximity/arm/ble_app_proximity.uvopt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1.0 4 |
### uVision Project, (C) Keil Software
5 | 6 | nrf51822_xxaa_s110 (256K) 7 | 8 | 0x4 9 | ARM-ADS 10 | 11 | 12 | 1 13 | 14 | 15 | Segger\JL2CM3.dll 16 | 17 | 18 | 19 | 0 20 | JL2CM3 21 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 22 | 23 | 24 | 25 | 26 | 27 | 28 | nrf51822_xxab_s110 (128K) 29 | 30 | 0x4 31 | ARM-ADS 32 | 33 | 34 | Segger\JL2CM3.dll 35 | 36 | 37 | 38 | 0 39 | JL2CM3 40 | -O78 -S1 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BB11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC2000 -FN1 -FF0nRF51xxx -FS00 -FL0200000 41 | 42 | 43 | 44 | 45 |
46 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/ble/ble_app_proximity/ble_bondmngr_cfg.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | */ 11 | 12 | /** @cond To make doxygen skip this file */ 13 | 14 | /** @file 15 | * 16 | * @defgroup ble_sdk_app_proximity_bondmngr_cfg Proximity Bond Manager Configuration 17 | * @{ 18 | * @ingroup ble_sdk_app_proximity 19 | * @brief Definition of bond manager configurable parameters 20 | */ 21 | 22 | #ifndef BLE_BONDMNGR_CFG_H__ 23 | #define BLE_BONDMNGR_CFG_H__ 24 | 25 | /**@brief Number of CCCDs used in the proximity application. */ 26 | #define BLE_BONDMNGR_CCCD_COUNT 1 27 | 28 | /**@brief Maximum number of bonded masters. */ 29 | #define BLE_BONDMNGR_MAX_BONDED_MASTERS 7 30 | 31 | #endif // BLE_BONDMNGR_CFG_H__ 32 | 33 | /** @} */ 34 | /** @endcond */ 35 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/ble/ble_app_proximity/findMeMasterServer.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/finnurtorfa/nrf51/910361df704b814e61687630408300924e16ed20/lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/ble/ble_app_proximity/findMeMasterServer.bin -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/blinky_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_PCA10001 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += nrf_delay.c 5 | 6 | OUTPUT_FILENAME := blinky_gcc 7 | SDK_PATH = ../../../../ 8 | 9 | 10 | #Uncomment correct line if you have softdevice programmed on the chip. 11 | DEVICE_VARIANT := xxaa 12 | #DEVICE_VARIANT := xxab 13 | 14 | #USE_SOFTDEVICE := S110 15 | #USE_SOFTDEVICE := S210 16 | 17 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/blinky_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/blinky_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/blinky_example/main.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * @brief Example project on GPIO usage to drive LEDs 15 | * @defgroup gpio_example_pca10001 GPIO example 16 | * @{ 17 | * @ingroup nrf_examples_pca10001 18 | * 19 | * @brief Example of GPIO output usage. 20 | * 21 | * This example shows how to configure GPIO pins as outputs which can also be used to drive LEDs. 22 | * Each LED is set on one at a time and each state lasts 100 milliseconds. 23 | */ 24 | 25 | #include 26 | #include 27 | #include "nrf_delay.h" 28 | #include "nrf_gpio.h" 29 | #include "boards.h" 30 | 31 | /** 32 | * main() function 33 | * @return 0. int return type required by ANSI/ISO standard. 34 | */ 35 | int main(void) 36 | { 37 | uint8_t output_state = 0; 38 | 39 | // Configure LED-pins as outputs 40 | nrf_gpio_range_cfg_output(LED_START, LED_STOP); 41 | 42 | while(true) 43 | { 44 | nrf_gpio_port_write(LED_PORT, 1 << (output_state + LED_OFFSET)); 45 | output_state = (output_state + 1) & BLINKY_STATE_MASK; 46 | nrf_delay_ms(100); 47 | } 48 | } 49 | 50 | /** 51 | *@} 52 | **/ 53 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/button_radio_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_PCA10001 2 | 3 | C_SOURCE_FILES += main_tx.c 4 | C_SOURCE_FILES += radio_config.c 5 | C_SOURCE_FILES += nrf_delay.c 6 | 7 | OUTPUT_FILENAME := button_radio_gcc 8 | SDK_PATH = ../../../../ 9 | 10 | 11 | #Uncomment correct line if you have softdevice programmed on the chip. 12 | DEVICE_VARIANT := xxaa 13 | #DEVICE_VARIANT := xxab 14 | 15 | #USE_SOFTDEVICE := S110 16 | #USE_SOFTDEVICE := S210 17 | 18 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 19 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/button_radio_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/button_radio_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/button_radio_example/radio_config.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef RADIO_CONFIG_H 13 | #define RADIO_CONFIG_H 14 | 15 | void radio_configure(void); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/led_radio_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_PCA10001 2 | 3 | C_SOURCE_FILES += main_rx.c 4 | C_SOURCE_FILES += radio_config.c 5 | C_SOURCE_FILES += nrf_delay.c 6 | 7 | OUTPUT_FILENAME := led_radio_gcc 8 | SDK_PATH = ../../../../ 9 | 10 | 11 | #Uncomment correct line if you have softdevice programmed on the chip. 12 | DEVICE_VARIANT := xxaa 13 | #DEVICE_VARIANT := xxab 14 | 15 | #USE_SOFTDEVICE := S110 16 | #USE_SOFTDEVICE := S210 17 | 18 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 19 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/led_radio_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/led_radio_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/led_radio_example/radio_config.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef RADIO_CONFIG_H 13 | #define RADIO_CONFIG_H 14 | 15 | void radio_configure(void); 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/uart_example/gcc/Makefile: -------------------------------------------------------------------------------- 1 | BOARD := BOARD_PCA10001 2 | 3 | C_SOURCE_FILES += main.c 4 | C_SOURCE_FILES += simple_uart.c 5 | 6 | OUTPUT_FILENAME := uart_example_gcc 7 | SDK_PATH = ../../../../ 8 | 9 | 10 | #Uncomment correct line if you have softdevice programmed on the chip. 11 | DEVICE_VARIANT := xxaa 12 | #DEVICE_VARIANT := xxab 13 | 14 | #USE_SOFTDEVICE := S110 15 | #USE_SOFTDEVICE := S210 16 | 17 | include $(SDK_PATH)Source/templates/gcc/Makefile.common 18 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/uart_example/gcc/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make clean release 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Board/pca10001/uart_example/gcc/flash.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | cs-make flash 3 | pause -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ble/ble_date_time.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/finnurtorfa/nrf51/910361df704b814e61687630408300924e16ed20/lib/nrf51sdk/Nordic/nrf51822/Include/ble/ble_date_time.h -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ble/ble_debug_assert_handler.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * 15 | * @defgroup ble_debug_assert_handler Assert Handler for debug purposes. 16 | * @{ 17 | * @ingroup ble_sdk_lib 18 | * @brief Module for handling of assert during application development when debugging. 19 | * 20 | * @details This module may be used during development of an application to facilitate debugging. 21 | * It contains a function to write file name, line number and the Stack Memory to flash. 22 | * This module is ONLY for debugging purposes and must never be used in final product. 23 | * 24 | */ 25 | 26 | #ifndef BLE_DEBUG_ASSERT_HANDLER_H__ 27 | #define BLE_DEBUG_ASSERT_HANDLER_H__ 28 | 29 | #include 30 | 31 | /**@brief Debug assert handler function, which can be called from an error handler. 32 | * To be used only for debugging purposes. 33 | * 34 | *@details This code will copy the filename and line number into local variables for them to always 35 | * be accessible in Keil debugger. The function will also write the ARM Cortex-M0 stack 36 | * memory into flash where it can be retrieved and manually un-winded in order to 37 | * back-trace the location where the error ocured.
38 | * @warning ALL INTERRUPTS WILL BE DISABLED. 39 | * 40 | * @note This function will never return but loop forever for debug purposes. 41 | * 42 | * @param[in] error_code Error code supplied to the handler. 43 | * @param[in] line_num Line number where the original handler is called. 44 | * @param[in] p_file_name Pointer to the file name. 45 | */ 46 | void ble_debug_assert_handler(uint32_t error_code, uint32_t line_num, const uint8_t * p_file_name); 47 | 48 | #endif /* BLE_DEBUG_ASSERT_HANDLER_H__ */ 49 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ble/ble_eval_board_pins.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * 15 | * @defgroup ble_sdk_lib_eval_board_pins Evaluation Board LEDs and Buttons Pin Assignments 16 | * @{ 17 | * @ingroup ble_sdk_lib 18 | * @brief Pin assignments for LEDs and Buttons on the evaluation board 19 | * 20 | * @details Pin assignments for LEDs and Buttons in evaluation board applications. 21 | */ 22 | 23 | #ifndef BLE_EVAL_BOARD_PINS_H__ 24 | #define BLE_EVAL_BOARD_PINS_H__ 25 | 26 | #define EVAL_BOARD_LED_0 18 /**< Pin connected to LED 0 in the pca10001 evaluation board.*/ 27 | #define EVAL_BOARD_LED_1 19 /**< Pin connected to LED 1 in the pca10001 evaluation board.*/ 28 | 29 | #define EVAL_BOARD_BUTTON_0 16 /**< Pin connected to BUTTON 0 in the pca10001 evaluation board.*/ 30 | #define EVAL_BOARD_BUTTON_1 17 /**< Pin connected to BUTTON 1 in the pca10001 evaluation board.*/ 31 | 32 | #define ADVERTISING_LED_PIN_NO EVAL_BOARD_LED_0 /**< Pin that can be used by applications to indicate advertising state.*/ 33 | #define CONNECTED_LED_PIN_NO EVAL_BOARD_LED_1 /**< Pin that can be used by applications to indicate connected state.*/ 34 | 35 | #endif // BLE_EVAL_BOARD_PINS_H__ 36 | 37 | /** @} */ 38 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ble/ble_nrf6310_pins.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * 15 | * @defgroup ble_sdk_lib_nrf6310_pins nRF6310 Board LEDs and Buttons Pin Assignments 16 | * @{ 17 | * @ingroup ble_sdk_lib 18 | * @brief Pin assignments for LEDs and Buttons on the nRF6310 board 19 | * 20 | * @details Pin assignments for LEDs and Buttons to be used in all SDK applications. 21 | */ 22 | 23 | #ifndef BLE_NRF6310_PINS_H__ 24 | #define BLE_NRF6310_PINS_H__ 25 | 26 | #define NRF6310_LED_0 8 27 | #define NRF6310_LED_1 9 28 | #define NRF6310_LED_2 10 29 | #define NRF6310_LED_3 11 30 | #define NRF6310_LED_4 12 31 | #define NRF6310_LED_5 13 32 | #define NRF6310_LED_6 14 33 | #define NRF6310_LED_7 15 34 | 35 | #define NRF6310_BUTTON_0 0 36 | #define NRF6310_BUTTON_1 1 37 | #define NRF6310_BUTTON_2 2 38 | #define NRF6310_BUTTON_3 3 39 | #define NRF6310_BUTTON_4 4 40 | #define NRF6310_BUTTON_5 5 41 | #define NRF6310_BUTTON_6 6 42 | #define NRF6310_BUTTON_7 7 43 | 44 | #define ADVERTISING_LED_PIN_NO NRF6310_LED_0 45 | #define CONNECTED_LED_PIN_NO NRF6310_LED_1 46 | #define ASSERT_LED_PIN_NO NRF6310_LED_7 47 | 48 | #endif // BLE_NRF6310_PINS_H__ 49 | 50 | /** @} */ 51 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ble/ble_radio_notification.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | */ 11 | 12 | /** @file 13 | * 14 | * @defgroup ble_radio_notification Radio Notification Event Handler 15 | * @{ 16 | * @ingroup ble_sdk_lib 17 | * @brief Module for propagating Radio Notification events to the application. 18 | */ 19 | 20 | #ifndef BLE_RADIO_NOTIFICATION_H__ 21 | #define BLE_RADIO_NOTIFICATION_H__ 22 | 23 | #include 24 | #include 25 | #include "nrf_soc.h" 26 | 27 | /**@brief Application radio notification event handler type. */ 28 | typedef void (*ble_radio_notification_evt_handler_t) (bool radio_active); 29 | 30 | /**@brief Initializes the Bond Manager. 31 | * 32 | * @param[in] irq_priority Interrupt priority for the Radio Notification interrupt handler. 33 | * @param[in] distance The time from an Active event until the radio is activated. 34 | * @param[in] evt_handler Handler to be executed when a radio notification event has been 35 | * received. 36 | * 37 | * @return NRF_SUCCESS on successful initialization, otherwise an error code. 38 | */ 39 | uint32_t ble_radio_notification_init(nrf_app_irq_priority_t irq_priority, 40 | nrf_radio_notification_distance_t distance, 41 | ble_radio_notification_evt_handler_t evt_handler); 42 | 43 | #endif // BLE_RADIO_NOTIFICATION_H__ 44 | 45 | /** @} */ 46 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ble/ble_sensorsim.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | /** @file 14 | * 15 | * @defgroup ble_sdk_lib_sensorsim Sensor Data Simulator 16 | * @{ 17 | * @ingroup ble_sdk_lib 18 | * @brief Functions for simulating sensor data. 19 | * 20 | * @details Currently only a triangular waveform simulator is implemented. 21 | */ 22 | 23 | #ifndef BLE_SENSORSIM_H__ 24 | #define BLE_SENSORSIM_H__ 25 | 26 | #include 27 | #include 28 | 29 | /**@brief Triangular waveform sensor simulator configuration. */ 30 | typedef struct 31 | { 32 | uint32_t min; /**< Minimum simulated value. */ 33 | uint32_t max; /**< Maximum simulated value. */ 34 | uint32_t incr; /**< Increment between each measurement. */ 35 | bool start_at_max; /**< TRUE is measurement is to start at the maximum value, FALSE if it is to start at the minimum. */ 36 | } ble_sensorsim_cfg_t; 37 | 38 | /**@brief Triangular waveform sensor simulator state. */ 39 | typedef struct 40 | { 41 | uint32_t current_val; /**< Current sensor value. */ 42 | bool is_increasing; /**< TRUE if the simulator is in increasing state, FALSE otherwise. */ 43 | } ble_sensorsim_state_t; 44 | 45 | /**@brief Initialize a triangular waveform sensor simulator. 46 | * 47 | * @param[out] p_state Current state of simulator. 48 | * @param[in] p_cfg Simulator configuration. 49 | */ 50 | void ble_sensorsim_init(ble_sensorsim_state_t * p_state, 51 | const ble_sensorsim_cfg_t * p_cfg); 52 | 53 | /**@brief Generate a simulated sensor measurement using a triangular waveform generator. 54 | * 55 | * @param[in,out] p_state Current state of simulator. 56 | * @param[in] p_cfg Simulator configuration. 57 | * 58 | * @return Simulator output. 59 | */ 60 | uint32_t ble_sensorsim_measure(ble_sensorsim_state_t * p_state, 61 | const ble_sensorsim_cfg_t * p_cfg); 62 | 63 | #endif // BLE_SENSORSIM_H__ 64 | 65 | /** @} */ 66 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ble/ble_services/ble_gls_db.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | */ 11 | 12 | /** @file 13 | * 14 | * @defgroup ble_sdk_srv_gls_db Glucose Database Service 15 | * @{ 16 | * @ingroup ble_sdk_srv 17 | * @brief Glucose Service module. 18 | * 19 | * @details This module implements at database of stored glucose measurement values. 20 | */ 21 | 22 | #ifndef BLE_GLS_DB_H__ 23 | #define BLE_GLS_DB_H__ 24 | 25 | #include 26 | #include "ble_gls.h" 27 | 28 | #define BLE_GLS_DB_MAX_RECORDS 20 29 | 30 | /**@brief Initialize the glucose record database. 31 | * 32 | * @details This call initializes the database holding glucose records. 33 | * 34 | * @return NRF_SUCCESS on success. 35 | */ 36 | uint32_t ble_gls_db_init(void); 37 | 38 | /**@brief Get the number of records in the database. 39 | * 40 | * @details This call returns the number of records in the database. 41 | * 42 | * @return Number of records in the database. 43 | */ 44 | uint16_t ble_gls_db_num_records_get(void); 45 | 46 | /**@brief Get a record from the database. 47 | * 48 | * @details This call returns a specified record from the database. 49 | * 50 | * @param[in] record_num Index of the record to retrieve. 51 | * @param[out] p_rec Pointer to record structure where retrieved record is copied to. 52 | * 53 | * @return NRF_SUCCESS on success. 54 | */ 55 | uint32_t ble_gls_db_record_get(uint8_t record_num, ble_gls_rec_t * p_rec); 56 | 57 | /**@brief Add a record at the end of the database. 58 | * 59 | * @details This call adds a record as the last record in the database. 60 | * 61 | * @param[in] p_rec Pointer to record to add to database. 62 | * 63 | * @return NRF_SUCCESS on success. 64 | */ 65 | uint32_t ble_gls_db_record_add(ble_gls_rec_t * p_rec); 66 | 67 | /**@brief Delete a database entry. 68 | * 69 | * @details This call deletes an record from the database. 70 | * 71 | * @param[in] record_num Index of record to delete. 72 | * 73 | * @return NRF_SUCCESS on success. 74 | */ 75 | uint32_t ble_gls_db_record_delete(uint8_t record_num); 76 | 77 | #endif // BLE_GLS_DB_H__ 78 | 79 | /** @} */ 80 | 81 | /** @endcond */ 82 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ble/softdevice/ble_err.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 3 | * 4 | * The information contained herein is confidential property of Nordic Semiconductor. The use, 5 | * copying, transfer or disclosure of such information is prohibited except by express written 6 | * agreement with Nordic Semiconductor. 7 | * 8 | */ 9 | /** 10 | @addtogroup BLE_COMMON 11 | @{ 12 | @addtogroup nrf_error 13 | @{ 14 | @ingroup BLE_COMMON 15 | @} 16 | 17 | @defgroup ble_err General error codes 18 | @{ 19 | 20 | @brief General error code definitions for the BLE API. 21 | 22 | @ingroup BLE_COMMON 23 | */ 24 | #ifndef NRF_BLE_ERR_H__ 25 | #define NRF_BLE_ERR_H__ 26 | 27 | #include "nrf_error.h" 28 | 29 | /* @defgroup BLE_ERRORS Error Codes 30 | * @{ */ 31 | #define BLE_ERROR_INVALID_CONN_HANDLE (NRF_ERROR_STK_BASE_NUM+0x001) /**< Invalid connection handle. */ 32 | #define BLE_ERROR_INVALID_ATTR_HANDLE (NRF_ERROR_STK_BASE_NUM+0x002) /**< Invalid attribute handle. */ 33 | #define BLE_ERROR_NO_TX_BUFFERS (NRF_ERROR_STK_BASE_NUM+0x003) /**< Buffer capacity exceeded. */ 34 | /** @} */ 35 | 36 | 37 | /** @defgroup BLE_ERROR_SUBRANGES Module specific error code subranges 38 | * @brief Assignment of subranges for module specific error codes. 39 | * @note For specific error codes, see ble_.h or ble_error_.h. 40 | * @{ */ 41 | #define NRF_L2CAP_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x100) /**< L2CAP specific errors. */ 42 | #define NRF_GAP_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x200) /**< GAP specific errors. */ 43 | #define NRF_GATTC_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x300) /**< GATT client specific errors. */ 44 | #define NRF_GATTS_ERR_BASE (NRF_ERROR_STK_BASE_NUM+0x400) /**< GATT server specific errors. */ 45 | /** @} */ 46 | 47 | #endif 48 | 49 | 50 | /** 51 | @} 52 | @} 53 | */ 54 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ble/softdevice/ble_ranges.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 3 | 4 | The information contained herein is confidential property of Nordic Semiconductor. The use, 5 | copying, transfer or disclosure of such information is prohibited except by express written 6 | agreement with Nordic Semiconductor. 7 | */ 8 | /** 9 | @addtogroup BLE_COMMON 10 | @{ 11 | @defgroup ble_ranges Module specific SVC and event number subranges 12 | @{ 13 | 14 | @brief Definition of SVC and event number subranges for each API module. 15 | 16 | @note 17 | SVCs and event numbers are split into subranges for each API module. 18 | Each module receives its entire allocated range of SVC calls, whether implemented or not, 19 | but return BLE_ERROR_NOT_SUPPORTED for unimplemented or undefined calls in its range. 20 | 21 | Note that the symbols BLE__SVC_LAST is the end of the allocated SVC range, 22 | rather than the last SVC function call actually defined and implemented. 23 | 24 | Specific SVC and event values are defined in each module's ble_.h file, 25 | which defines names of each individual SVC code based on the range start value. 26 | */ 27 | 28 | #ifndef BLE_RANGES_H__ 29 | #define BLE_RANGES_H__ 30 | 31 | #define BLE_SVC_BASE 0x50 32 | #define BLE_SVC_LAST 0x5B /* Total: 12. */ 33 | 34 | #define BLE_RESERVED_SVC_BASE 0x5C 35 | #define BLE_RESERVED_SVC_LAST 0x5F /* Total: 4. */ 36 | 37 | #define BLE_GAP_SVC_BASE 0x60 38 | #define BLE_GAP_SVC_LAST 0x7F /* Total: 32. */ 39 | 40 | #define BLE_GATTC_SVC_BASE 0x80 41 | #define BLE_GATTC_SVC_LAST 0x9F /* Total: 32. */ 42 | 43 | #define BLE_GATTS_SVC_BASE 0xA0 44 | #define BLE_GATTS_SVC_LAST 0xAF /* Total: 16. */ 45 | 46 | #define BLE_L2CAP_SVC_BASE 0xB0 47 | #define BLE_L2CAP_SVC_LAST 0xBF /* Total: 16. */ 48 | 49 | 50 | #define BLE_EVT_INVALID 0x00 51 | 52 | #define BLE_EVT_BASE 0x01 53 | #define BLE_EVT_LAST 0x0F /* Total: 15. */ 54 | 55 | #define BLE_GAP_EVT_BASE 0x10 56 | #define BLE_GAP_EVT_LAST 0x2F /* Total: 32. */ 57 | 58 | #define BLE_GATTC_EVT_BASE 0x30 59 | #define BLE_GATTC_EVT_LAST 0x4F /* Total: 32. */ 60 | 61 | #define BLE_GATTS_EVT_BASE 0x50 62 | #define BLE_GATTS_EVT_LAST 0x6F /* Total: 32. */ 63 | 64 | #define BLE_L2CAP_EVT_BASE 0x70 65 | #define BLE_L2CAP_EVT_LAST 0x8F /* Total: 32. */ 66 | 67 | #endif /* BLE_RANGES_H__ */ 68 | 69 | /** 70 | @} 71 | @} 72 | */ 73 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ble/softdevice/nrf_error_sdm.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 3 | * 4 | * The information contained herein is confidential property of Nordic Semiconductor. The use, 5 | * copying, transfer or disclosure of such information is prohibited except by express written 6 | * agreement with Nordic Semiconductor. 7 | * 8 | */ 9 | /** 10 | @addtogroup nrf_sdm_api 11 | @{ 12 | @defgroup nrf_sdm_error SoftDevice Manager Error Codes 13 | @{ 14 | 15 | @brief Error definitions for the SDM API 16 | */ 17 | 18 | /* Header guard */ 19 | #ifndef NRF_ERROR_SDM_H__ 20 | #define NRF_ERROR_SDM_H__ 21 | 22 | #include "nrf_error.h" 23 | 24 | #define NRF_ERROR_SDM_LFCLK_SOURCE_UNKNOWN (NRF_ERROR_SDM_BASE_NUM + 0) ///< Unknown lfclk source 25 | #define NRF_ERROR_SDM_INCORRECT_INTERRUPT_CONFIGURATION (NRF_ERROR_SDM_BASE_NUM + 1) ///< Incorrect interrupt configuration (can be caused by using illegal priority levels, or having enabled SoftDevice interrupts) 26 | #define NRF_ERROR_SDM_INCORRECT_CLENR0 (NRF_ERROR_SDM_BASE_NUM + 2) ///< Incorrect CLENR0 (can be caused by erronous SoftDevice flashing) 27 | 28 | #endif // NRF_ERROR_SDM_H__ 29 | 30 | /** 31 | @} 32 | @} 33 | */ 34 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ble/softdevice/nrf_error_soc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 3 | * 4 | * The information contained herein is confidential property of Nordic Semiconductor. The use, 5 | * copying, transfer or disclosure of such information is prohibited except by express written 6 | * agreement with Nordic Semiconductor. 7 | * 8 | */ 9 | /** 10 | @addtogroup nrf_soc_api 11 | @{ 12 | @defgroup nrf_soc_error SoC Library Error Codes 13 | @{ 14 | 15 | @brief Error definitions for the SoC library 16 | 17 | */ 18 | 19 | /* Header guard */ 20 | #ifndef NRF_ERROR_SOC_H__ 21 | #define NRF_ERROR_SOC_H__ 22 | 23 | #include "nrf_error.h" 24 | 25 | /* Mutex Errors */ 26 | #define NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN (NRF_ERROR_SOC_BASE_NUM + 0) ///< Mutex already taken 27 | 28 | /* NVIC errors */ 29 | #define NRF_ERROR_SOC_NVIC_INTERRUPT_NOT_AVAILABLE (NRF_ERROR_SOC_BASE_NUM + 1) ///< NVIC interrupt not available 30 | #define NRF_ERROR_SOC_NVIC_INTERRUPT_PRIORITY_NOT_ALLOWED (NRF_ERROR_SOC_BASE_NUM + 2) ///< NVIC interrupt priority not allowed 31 | #define NRF_ERROR_SOC_NVIC_SHOULD_NOT_RETURN (NRF_ERROR_SOC_BASE_NUM + 3) ///< NVIC should not return 32 | 33 | /* Power errors */ 34 | #define NRF_ERROR_SOC_POWER_MODE_UNKNOWN (NRF_ERROR_SOC_BASE_NUM + 4) ///< Power mode unknown 35 | #define NRF_ERROR_SOC_POWER_POF_THRESHOLD_UNKNOWN (NRF_ERROR_SOC_BASE_NUM + 5) ///< Power POF threshold unknown 36 | #define NRF_ERROR_SOC_POWER_OFF_SHOULD_NOT_RETURN (NRF_ERROR_SOC_BASE_NUM + 6) ///< Power off should not return 37 | 38 | /* Rand errors */ 39 | #define NRF_ERROR_SOC_RAND_NOT_ENOUGH_VALUES (NRF_ERROR_SOC_BASE_NUM + 7) ///< RAND not enough values 40 | 41 | /* PPI errors */ 42 | #define NRF_ERROR_SOC_PPI_INVALID_CHANNEL (NRF_ERROR_SOC_BASE_NUM + 8) ///< Invalid PPI Channel 43 | #define NRF_ERROR_SOC_PPI_INVALID_GROUP (NRF_ERROR_SOC_BASE_NUM + 9) ///< Invalid PPI Group 44 | 45 | #endif // NRF_ERROR_SOC_H__ 46 | /** 47 | @} 48 | @} 49 | */ 50 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ble/softdevice/nrf_svc.h: -------------------------------------------------------------------------------- 1 | #ifndef NRF_SVC__ 2 | #define NRF_SVC__ 3 | 4 | #ifdef SVCALL_AS_NORMAL_FUNCTION 5 | #define SVCALL(number, return_type, signature) return_type signature 6 | #else 7 | 8 | #ifndef SVCALL 9 | #if defined (__CC_ARM) 10 | #define SVCALL(number, return_type, signature) return_type __svc(number) signature 11 | #elif defined (__GNUC__) 12 | #define SVCALL(number, return_type, signature) \ 13 | _Pragma("GCC diagnostic ignored \"-Wreturn-type\"") \ 14 | _Pragma("GCC diagnostic ignored \"-Wunused-function\"") \ 15 | __attribute__((naked)) static return_type signature \ 16 | { \ 17 | __asm( \ 18 | "svc %0\n" \ 19 | "bx r14" : : "I" (number) : "r0" \ 20 | ); \ 21 | } 22 | #elif defined (__ICCARM__) 23 | #define PRAGMA(x) _Pragma(#x) 24 | #define SVCALL(number, return_type, signature) \ 25 | PRAGMA(swi_number = number) \ 26 | __swi return_type signature; 27 | #else 28 | #define SVCALL(number, return_type, signature) return_type signature 29 | #endif 30 | #endif // SVCALL 31 | 32 | #endif // SVCALL_AS_NORMAL_FUNCTION 33 | #endif // NRF_SVC__ 34 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ble/softdevice/softdevice_assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 3 | * 4 | * The information contained herein is confidential property of Nordic Semiconductor. The use, 5 | * copying, transfer or disclosure of such information is prohibited except by express written 6 | * agreement with Nordic Semiconductor. 7 | * 8 | */ 9 | 10 | /** @brief Utilities for verifying program logic 11 | */ 12 | 13 | #ifndef SOFTDEVICE_ASSERT_H_ 14 | #define SOFTDEVICE_ASSERT_H_ 15 | 16 | #include 17 | 18 | /** @brief This function handles assertions. 19 | * 20 | * 21 | * @note 22 | * This function is called when an assertion has triggered. 23 | * 24 | * 25 | * @param line_num The line number where the assertion is called 26 | * @param file_name Pointer to the file name 27 | */ 28 | void assert_softdevice_callback(uint16_t line_num, const uint8_t *file_name); 29 | 30 | 31 | /*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */ 32 | /*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \ 33 | /** @brief Check intended for production code 34 | * 35 | * Check passes if "expr" evaluates to true. */ 36 | #define ASSERT(expr) \ 37 | if (expr) \ 38 | { \ 39 | } \ 40 | else \ 41 | { \ 42 | assert_softdevice_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \ 43 | /*lint -unreachable */ \ 44 | } 45 | 46 | #endif /* SOFTDEVICE_ASSERT_H_ */ 47 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/boards.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef BOARDS_H 13 | #define BOARDS_H 14 | 15 | #if defined(BOARD_NRF6310) 16 | #include "boards/nrf6310.h" 17 | #elif defined(BOARD_PCA10000) 18 | #include "boards/pca10000.h" 19 | #elif defined(BOARD_PCA10001) 20 | #include "boards/pca10001.h" 21 | #elif defined(BOARD_PCA10003) 22 | #include "boards/pca10003.h" 23 | #else 24 | #error "Board is not defined" 25 | #endif 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/boards/nrf6310.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef NRF6310_H 13 | #define NRF6310_H 14 | 15 | #define LED_START 8 16 | #define LED_STOP 15 17 | #define LED_PORT NRF_GPIO_PORT_SELECT_PORT1 18 | #define LED_OFFSET 0 19 | 20 | #define LED0 8 21 | #define LED1 9 22 | 23 | #define BUTTON_START 0 24 | #define BUTTON0 0 25 | #define BUTTON_STOP 7 26 | #define BUTTON1 1 27 | 28 | #define RX_PIN_NUMBER 16 // UART RX pin number. 29 | #define TX_PIN_NUMBER 17 // UART TX pin number. 30 | #define CTS_PIN_NUMBER 18 // UART Clear To Send pin number. Not used if HWFC is set to false 31 | #define RTS_PIN_NUMBER 19 // Not used if HWFC is set to false 32 | #define HWFC false // UART hardware flow control 33 | 34 | #define BLINKY_STATE_MASK 0x07 35 | 36 | #endif 37 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/boards/pca10000.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef PCA10000_H 13 | #define PCA10000_H 14 | 15 | #define RX_PIN_NUMBER 3 16 | #define TX_PIN_NUMBER 1 17 | #define CTS_PIN_NUMBER 2 18 | #define RTS_PIN_NUMBER 0 19 | #define HWFC true 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/boards/pca10001.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef PCA10001_H 13 | #define PCA10001_H 14 | 15 | #define LED_START 18 16 | #define LED0 18 17 | #define LED_STOP 19 18 | #define LED1 19 19 | #define LED_PORT NRF_GPIO_PORT_SELECT_PORT2 20 | #define LED_OFFSET 2 21 | 22 | #define BUTTON_START 16 23 | #define BUTTON0 16 24 | #define BUTTON_STOP 17 25 | #define BUTTON1 17 26 | 27 | #define RX_PIN_NUMBER 11 28 | #define TX_PIN_NUMBER 9 29 | #define CTS_PIN_NUMBER 10 30 | #define RTS_PIN_NUMBER 8 31 | #define HWFC true 32 | 33 | #define BLINKY_STATE_MASK 0x01 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/boards/pca10003.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef PCA10003_H 13 | #define PCA10003_H 14 | 15 | #define LED_START 18 16 | #define LED0 18 17 | #define LED_STOP 19 18 | #define LED1 19 19 | #define LED_PORT NRF_GPIO_PORT_SELECT_PORT2 20 | #define LED_OFFSET 2 21 | 22 | #define BUTTON_START 16 23 | #define BUTTON0 16 24 | #define BUTTON_STOP 17 25 | #define BUTTON1 17 26 | 27 | #define RX_PIN_NUMBER 11 28 | #define TX_PIN_NUMBER 9 29 | #define CTS_PIN_NUMBER 10 30 | #define RTS_PIN_NUMBER 8 31 | #define HWFC true 32 | 33 | #define BLINKY_STATE_MASK 0x01 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/common.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #ifndef COMMON_H 14 | #define COMMON_H 15 | 16 | /*lint ++flb "Enter library region" */ 17 | 18 | #include 19 | #include 20 | 21 | /* @file 22 | * @brief Common header file for generic macros and definitions 23 | * 24 | */ 25 | 26 | /* 27 | * GPIO glue macros, this can be used to define a pin number in source/header file and use that macro for pin 28 | * configuration using this expansion. 29 | * example: 30 | * #define RESET_PIN 8 31 | * NRF_GPIO->PINCNF(RESET_PIN) = XXX ; // Expanded NRF_GPIO->PIN_CNF[8] = XXX 32 | */ 33 | #define PINX_GLUE(x, y, z) x##y##_##z /*!< first level glue for pin macros */ 34 | #define PINCNF(p) PINX_GLUE(PIN,p,CNF) /*!< gpio configure pin number 'p' */ 35 | #define PINOUT(p) PINX_GLUE(PIN,p,OUT) /*!< gpio out pin number 'p' */ 36 | 37 | /*lint --flb "Leave library region" */ 38 | #endif 39 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/compiler_abstraction.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is confidential property of Nordic 4 | * Semiconductor ASA.Terms and conditions of usage are described in detail 5 | * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #ifndef _COMPILER_ABSTRACTION_H 14 | #define _COMPILER_ABSTRACTION_H 15 | 16 | /*lint ++flb "Enter library region" */ 17 | 18 | #if defined ( __CC_ARM ) 19 | #define __ASM __asm /*!< asm keyword for ARM Compiler */ 20 | #define __INLINE __inline /*!< inline keyword for ARM Compiler */ 21 | 22 | #elif defined ( __ICCARM__ ) 23 | #define __ASM __asm /*!< asm keyword for IAR Compiler */ 24 | #define __INLINE inline /*!< inline keyword for IAR Compiler. Only avaiable in High optimization mode! */ 25 | 26 | #elif defined ( __GNUC__ ) 27 | #define __ASM __asm /*!< asm keyword for GNU Compiler */ 28 | #define __INLINE inline /*!< inline keyword for GNU Compiler */ 29 | 30 | #elif defined ( __TASKING__ ) 31 | #define __ASM __asm /*!< asm keyword for TASKING Compiler */ 32 | #define __INLINE inline /*!< inline keyword for TASKING Compiler */ 33 | 34 | #endif 35 | 36 | /*lint --flb "Leave library region" */ 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ext_sensors/ds1624.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #ifndef DS1624_H 14 | #define DS1624_H 15 | 16 | /*lint ++flb "Enter library region" */ 17 | 18 | #include 19 | #include 20 | 21 | /** @file 22 | * @brief DS1624 digital temperature sensor driver. 23 | * 24 | * 25 | * @defgroup nrf_drivers_ds1624 DS1624 digital temperature sensor driver 26 | * @{ 27 | * @ingroup nrf_drivers 28 | * @brief DS1624 digital temperature sensor driver. 29 | */ 30 | 31 | /** 32 | * Initializes DS1624 temperature sensor to 1-shot mode. 33 | * 34 | * @note Before calling this function, you must initialize twi_master first. 35 | * 36 | * @param device_address Bits [2:0] for the device address. All other bits must be zero. 37 | * @return 38 | * @retval true If communication succeeded with the device. 39 | * @retval false If communication failed with the device. 40 | */ 41 | bool ds1624_init(uint8_t device_address); 42 | 43 | /** 44 | * Reads temperature from the sensor. 45 | * 46 | * @param temperature_in_celcius Memory location to store temperature in full celcius degrees. 47 | * @param temperature_fraction Memory location to store temperature's fraction part in 0.03125 celcius degree increments. 48 | * @return 49 | * @retval true Temperature was successfully read 50 | * @retval false Temperature reading failed or conversion was not yet complete 51 | */ 52 | bool ds1624_temp_read(int8_t *temperature_in_celcius, int8_t *temperature_fraction); 53 | 54 | /** 55 | * Starts temperature conversion. Valid data will be available 400-1000 milliseconds after exiting this function. 56 | * 57 | * @return 58 | * @retval true Temperature conversion started. 59 | * @retval false Temperature converion failed to start. 60 | */ 61 | bool ds1624_start_temp_conversion(void); 62 | 63 | /** 64 | * Checks if temperature conversion is done. 65 | * 66 | * @return 67 | * @retval true Temperature conversion done. 68 | * @retval false Temperature converion still in progress. 69 | */ 70 | bool ds1624_is_temp_conversion_done(void); 71 | 72 | /** 73 | *@} 74 | **/ 75 | 76 | /*lint --flb "Leave library region" */ 77 | #endif 78 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ext_sensors/mpu6050.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #ifndef MPU6050_H 14 | #define MPU6050_H 15 | 16 | /*lint ++flb "Enter library region" */ 17 | 18 | #include 19 | #include 20 | 21 | /** @file 22 | * @brief MPU6050 gyro/accelerometer driver. 23 | * 24 | * 25 | * @defgroup nrf_drivers_mpu6050 MPU6050 gyro/accelerometer driver 26 | * @{ 27 | * @ingroup nrf_drivers 28 | * @brief MPU6050 gyro/accelerometer driver. 29 | */ 30 | 31 | /** 32 | * Initializes MPU6050 and verifies it's on the bus. 33 | * 34 | * @param device_address Device TWI address in bits [6:0]. 35 | * @return 36 | * @retval true MPU6050 found on the bus and ready for operation. 37 | * @retval false MPU6050 not found on the bus or communication failure. 38 | */ 39 | bool mpu6050_init(uint8_t device_address); 40 | 41 | /** 42 | @brief Writes a MPU6050 register contents over TWI. 43 | @param[in] register_address Register address to start writing to 44 | @param[in] value Value to write to register 45 | @retval true Register write succeeded 46 | @retval false Register write failed 47 | */ 48 | bool mpu6050_register_write(uint8_t register_address, const uint8_t value); 49 | 50 | /** 51 | @brief Function to read MPU6050 register contents over TWI. 52 | Reads one or more consecutive registers. 53 | @param[in] register_address Register address to start reading from 54 | @param[in] number_of_bytes Number of bytes to read 55 | @param[out] destination Pointer to a data buffer where read data will be stored 56 | @retval true Register read succeeded 57 | @retval false Register read failed 58 | */ 59 | bool mpu6050_register_read(uint8_t register_address, uint8_t *destination, uint8_t number_of_bytes); 60 | 61 | /** 62 | @brief Reads and verifies MPU6050 product ID. 63 | @retval true Product ID is what was expected 64 | @retval false Product ID was not what was expected 65 | */ 66 | bool mpu6050_verify_product_id(void); 67 | 68 | /** 69 | *@} 70 | **/ 71 | 72 | /*lint --flb "Leave library region" */ 73 | 74 | #endif /* MPU6050_H */ 75 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/ext_sensors/sdio.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #ifndef SDIO_H 14 | #define SDIO_H 15 | 16 | /*lint ++flb "Enter library region" */ 17 | 18 | #include 19 | #include 20 | 21 | /** @file 22 | * @brief 2-wire serial interface driver (compatible with ADNS2080 mouse sensor driver) 23 | * 24 | * 25 | * @defgroup nrf_drivers_sdio SDIO driver 26 | * @{ 27 | * @ingroup nrf_drivers 28 | * @brief 2-wire serial interface driver. 29 | */ 30 | 31 | /** 32 | * Initializes 2-wire serial interface and tries to handle stuck slaves. 33 | * 34 | */ 35 | void sdio_init(void); 36 | 37 | /** 38 | * Reads a byte over 2-wire serial interface. 39 | * 40 | * Developer needs to implement this function in a way that suits the hardware. 41 | * @param address Register address to read from 42 | * @return Byte read 43 | */ 44 | uint8_t sdio_read_byte(uint8_t address); 45 | 46 | /** 47 | * Reads several bytes over 2-wire serial interface using burst mode. 48 | * 49 | * Developer needs to implement this function in a way that suits the hardware. 50 | * @param target_buffer Buffer location to store read bytes to 51 | * @param target_buffer_size Bytes allocated for target_buffer 52 | */ 53 | void sdio_read_burst(uint8_t *target_buffer, uint8_t target_buffer_size); 54 | 55 | /** 56 | * Writes a byte over 2-wire serial interface. 57 | * 58 | * Developer needs to implement this function in a way that suits the hardware. 59 | * @param address Register address to write to 60 | * @param data_byte Data byte to write 61 | */ 62 | void sdio_write_byte(uint8_t address, uint8_t data_byte); 63 | 64 | /** 65 | *@} 66 | **/ 67 | 68 | /*lint --flb "Leave library region" */ 69 | #endif 70 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/nrf.h: -------------------------------------------------------------------------------- 1 | #ifndef NRF_H 2 | #define NRF_H 3 | 4 | #ifndef _WIN32 5 | 6 | #include "compiler_abstraction.h" 7 | 8 | #ifdef NRF51 9 | #include "nrf51.h" 10 | #include "nrf51_bitfields.h" 11 | #include "nrf51_deprecated.h" 12 | #else 13 | #error "Device is not supported." 14 | #endif /* NRF51 */ 15 | 16 | #endif /* _WIN32 */ 17 | 18 | #endif /* NRF_H */ 19 | 20 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/nrf_assert.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved. 3 | * 4 | * The information contained herein is confidential property of Nordic Semiconductor. The use, 5 | * copying, transfer or disclosure of such information is prohibited except by express written 6 | * agreement with Nordic Semiconductor. 7 | * 8 | */ 9 | 10 | /** @file 11 | * @brief Utilities for verifying program logic 12 | */ 13 | 14 | #ifndef NRF_ASSERT_H_ 15 | #define NRF_ASSERT_H_ 16 | 17 | #include 18 | 19 | #if defined(DEBUG_NRF) || defined(DEBUG_NRF_USER) 20 | 21 | /** @brief This function handles assertions. 22 | * 23 | * 24 | * @note 25 | * This function is called when an assertion has triggered. 26 | * 27 | * 28 | * @post 29 | * All hardware is put into an idle non-emitting state (in particular the radio is highly 30 | * important to switch off since the radio might be in a state that makes it send 31 | * packets continiously while a typical final infinit ASSERT loop is executing). 32 | * 33 | * 34 | * @param line_num The line number where the assertion is called 35 | * @param file_name Pointer to the file name 36 | */ 37 | void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name); 38 | 39 | /*lint -emacro(506, ASSERT) */ /* Suppress "Constant value Boolean */ 40 | /*lint -emacro(774, ASSERT) */ /* Suppress "Boolean within 'if' always evaluates to True" */ \ 41 | /** @brief Check intended for production code 42 | * 43 | * Check passes if "expr" evaluates to true. */ 44 | #define ASSERT(expr) \ 45 | if (expr) \ 46 | { \ 47 | } \ 48 | else \ 49 | { \ 50 | assert_nrf_callback((uint16_t)__LINE__, (uint8_t *)__FILE__); \ 51 | } 52 | #else 53 | #define ASSERT(expr) //!< Assert empty when disabled 54 | #endif /* defined(DEBUG_NRF) || defined(DEBUG_NRF_USER) */ 55 | 56 | #endif /* NRF_ASSERT_H_ */ 57 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/nrf_delay.h: -------------------------------------------------------------------------------- 1 | #ifndef _NRF_DELAY_H 2 | #define _NRF_DELAY_H 3 | 4 | #include "nrf.h" 5 | 6 | /*lint --e{438, 522} "Variable not used" "Function lacks side-effects" */ 7 | #if defined ( __CC_ARM ) 8 | static __ASM void __INLINE nrf_delay_us(uint32_t volatile number_of_us) 9 | { 10 | loop 11 | SUBS R0, R0, #1 12 | NOP 13 | NOP 14 | NOP 15 | NOP 16 | NOP 17 | NOP 18 | NOP 19 | NOP 20 | NOP 21 | NOP 22 | NOP 23 | NOP 24 | BNE loop 25 | BX LR 26 | } 27 | #elif defined ( __ICCARM__ ) 28 | static void __INLINE nrf_delay_us(uint32_t volatile number_of_us) 29 | { 30 | __ASM ( 31 | "loop:\n\t" 32 | " SUBS R0, R0, #1\n\t" 33 | " NOP\n\t" 34 | " NOP\n\t" 35 | " NOP\n\t" 36 | " NOP\n\t" 37 | " NOP\n\t" 38 | " NOP\n\t" 39 | " NOP\n\t" 40 | " NOP\n\t" 41 | " NOP\n\t" 42 | " NOP\n\t" 43 | " NOP\n\t" 44 | " NOP\n\t" 45 | " BNE loop\n\t" 46 | " BX LR\n\t"); 47 | } 48 | #elif defined ( __GNUC__ ) 49 | static void __INLINE nrf_delay_us(uint32_t volatile number_of_us) 50 | { 51 | while(number_of_us--) 52 | { 53 | __ASM(" NOP\n\t" 54 | " NOP\n\t" 55 | " NOP\n\t" 56 | " NOP\n\t" 57 | " NOP\n\t" 58 | " NOP\n\t" 59 | " NOP\n\t" 60 | " NOP\n\t" 61 | " NOP\n\t" 62 | " NOP\n\t" 63 | " NOP\n\t" 64 | " NOP\n\t" 65 | " NOP\n\t" 66 | " NOP\n\t" 67 | " NOP\n\t"); 68 | }; 69 | } 70 | #endif 71 | 72 | void nrf_delay_ms(uint32_t volatile number_of_ms); 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/nrf_ecb.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is confidential property of Nordic 4 | * Semiconductor ASA.Terms and conditions of usage are described in detail 5 | * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | * $LastChangedRevision: 13999 $ 12 | */ 13 | 14 | /** 15 | * @file 16 | * @brief ECB driver API. 17 | */ 18 | 19 | #ifndef NRF_ECB_H__ 20 | #define NRF_ECB_H__ 21 | 22 | /** 23 | * @defgroup nrf_ecb AES ECB encryption 24 | * @{ 25 | * @ingroup nrf_drivers 26 | * @brief Driver for the nRF51 AES Electronic Code Book (ECB) peripheral. 27 | * 28 | * In order to encrypt and decrypt data the peripheral must be powered on 29 | * using nrf_ecb_init() and then the key set using nrf_ecb_set_key. 30 | */ 31 | 32 | #include 33 | 34 | /** 35 | * Initialize and power on the ECB peripheral. 36 | * 37 | * Allocates memory for the ECBDATAPTR. 38 | * @retval true Initialization was successful. 39 | * @retval false Powering up failed. 40 | */ 41 | bool nrf_ecb_init(void); 42 | 43 | /** 44 | * Encrypt/decrypt 16-byte data using current key. 45 | * 46 | * The function avoids unnecessary copying of data if the point to the 47 | * correct locations in the ECB data structure. 48 | * 49 | * @param dst Result of encryption/decryption. 16 bytes will be written. 50 | * @param src Source with 16-byte data to be encrypted/decrypted. 51 | * 52 | * @retval true If the encryption operation completed. 53 | * @retval false If the encryption operation did not complete. 54 | */ 55 | bool nrf_ecb_crypt(uint8_t * dst, const uint8_t * src); 56 | 57 | /** 58 | * Set the key to be used for encryption/decryption. 59 | * 60 | * @param key Pointer to key. 16 bytes will be read. 61 | */ 62 | void nrf_ecb_set_key(const uint8_t * key); 63 | 64 | #endif // NRF_ECB_H__ 65 | 66 | /** @} */ 67 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/nrf_temp.h: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #ifndef NRF_TEMP_H__ 13 | #define NRF_TEMP_H__ 14 | 15 | #include "nrf51.h" 16 | 17 | /** 18 | * @defgroup nrf_temperature TEMP (temperature) abstraction 19 | * @{ 20 | * @ingroup nrf_drivers 21 | * @brief Temperature module init and read functions. 22 | * 23 | */ 24 | 25 | 26 | 27 | /** 28 | * @brief Prepare the temp module for temperature measurement. 29 | * 30 | * This function initializes the TEMP module and writes to the hidden configuration register. 31 | * 32 | * @param none 33 | */ 34 | static __INLINE void nrf_temp_init(void) 35 | { 36 | *(uint32_t *) 0x4000C504 = 0; 37 | } 38 | 39 | 40 | 41 | #define MASK_SIGN (0x00000200UL) 42 | #define MASK_SIGN_EXTENSION (0xFFFFFC00UL) 43 | 44 | /** 45 | * @brief Read temperature measurement. 46 | * 47 | * The function reads the 10 bit 2's complement value and transforms it to a 32 bit 2's complement value. 48 | * 49 | * @param none 50 | */ 51 | static __INLINE int32_t nrf_temp_read(void) 52 | { 53 | // Workaround for PAN_028 rev1.1 anomaly 24 - TEMP: Negative measured values are not represented correctly 54 | return ((NRF_TEMP->TEMP & MASK_SIGN) != 0) ? (NRF_TEMP->TEMP | MASK_SIGN_EXTENSION) : (NRF_TEMP->TEMP); 55 | } 56 | 57 | /** @} */ 58 | 59 | #endif 60 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Include/system_nrf51.h: -------------------------------------------------------------------------------- 1 | #ifndef __SYSTEM_NRF51_H 2 | #define __SYSTEM_NRF51_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | 8 | #include 9 | 10 | #define __XTAL (16000000UL) /* Oscillator frequency */ 11 | 12 | extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */ 13 | 14 | extern void SystemInit (void); 15 | 16 | extern void SystemCoreClockUpdate (void); 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/app_common/app_fifo.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #include "app_fifo.h" 14 | #include "app_util.h" 15 | 16 | 17 | #define FIFO_LENGTH (p_fifo->write_pos - p_fifo->read_pos) /**< Macro for calculating the FIFO length. */ 18 | 19 | 20 | uint32_t app_fifo_init(app_fifo_t * p_fifo, uint8_t * p_buf, uint16_t buf_size) 21 | { 22 | // Check buffer for null pointer 23 | if (p_buf == NULL) 24 | { 25 | return NRF_ERROR_NULL; 26 | } 27 | 28 | // Check that the buffer size is a power of two 29 | if (!IS_POWER_OF_TWO(buf_size)) 30 | { 31 | return NRF_ERROR_INVALID_LENGTH; 32 | } 33 | 34 | p_fifo->p_buf = p_buf; 35 | p_fifo->buf_size_mask = buf_size - 1; 36 | p_fifo->read_pos = 0; 37 | p_fifo->write_pos = 0; 38 | 39 | return NRF_SUCCESS; 40 | } 41 | 42 | 43 | uint32_t app_fifo_put(app_fifo_t * p_fifo, uint8_t byte) 44 | { 45 | if (FIFO_LENGTH <= p_fifo->buf_size_mask) 46 | { 47 | p_fifo->p_buf[p_fifo->write_pos & p_fifo->buf_size_mask] = byte; 48 | p_fifo->write_pos++; 49 | return NRF_SUCCESS; 50 | } 51 | 52 | return NRF_ERROR_NO_MEM; 53 | } 54 | 55 | 56 | uint32_t app_fifo_get(app_fifo_t * p_fifo, uint8_t * p_byte) 57 | { 58 | if (FIFO_LENGTH != 0) 59 | { 60 | *p_byte = p_fifo->p_buf[p_fifo->read_pos & p_fifo->buf_size_mask]; 61 | p_fifo->read_pos++; 62 | return NRF_SUCCESS; 63 | } 64 | 65 | return NRF_ERROR_NOT_FOUND; 66 | 67 | } 68 | 69 | uint32_t app_fifo_flush(app_fifo_t * p_fifo) 70 | { 71 | p_fifo->read_pos = p_fifo->write_pos; 72 | return NRF_SUCCESS; 73 | } 74 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/ble/ble_debug_assert_handler.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2013 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #include "ble_debug_assert_handler.h" 14 | #include 15 | #include "nrf51.h" 16 | #include "ble_error_log.h" 17 | #include "nordic_common.h" 18 | 19 | #define MAX_LENGTH_FILENAME 128 /**< Max length of filename to copy for the debug error handlier. */ 20 | 21 | 22 | // WARNING - DO NOT USE THIS FUNCTION IN END PRODUCT. - WARNING 23 | // WARNING - FOR DEBUG PURPOSES ONLY. - WARNING 24 | void ble_debug_assert_handler(uint32_t error_code, uint32_t line_num, const uint8_t * p_file_name) 25 | { 26 | // Copying parameters to static variables because parameters may not be accessible in debugger. 27 | static volatile uint8_t s_file_name[MAX_LENGTH_FILENAME]; 28 | static volatile uint16_t s_line_num; 29 | static volatile uint32_t s_error_code; 30 | 31 | strncpy((char *)s_file_name, (const char *)p_file_name, MAX_LENGTH_FILENAME - 1); 32 | s_file_name[MAX_LENGTH_FILENAME - 1] = '\0'; 33 | s_line_num = line_num; 34 | s_error_code = error_code; 35 | UNUSED_VARIABLE(s_file_name); 36 | UNUSED_VARIABLE(s_line_num); 37 | UNUSED_VARIABLE(s_error_code); 38 | 39 | // WARNING: The PRIMASK register is set to disable ALL interrups during writing the error log. 40 | // 41 | // Do not use __disable_irq() in normal operation. 42 | __disable_irq(); 43 | 44 | // This function will write error code, filename, and line number to the flash. 45 | // In addition, the Cortex-M0 stack memory will also be written to the flash. 46 | // (void) ble_error_log_write(error_code, p_file_name, line_num); 47 | 48 | // For debug purposes, this function never returns. 49 | // Attach a debugger for tracing the error cause. 50 | for (;;) 51 | { 52 | // Do nothing. 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/ble/ble_racp.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | */ 11 | 12 | #include "ble_racp.h" 13 | #include 14 | 15 | 16 | void ble_racp_decode(uint8_t data_len, uint8_t * p_data, ble_racp_value_t * p_racp_val) 17 | { 18 | p_racp_val->opcode = 0xFF; 19 | p_racp_val->operator = 0xFF; 20 | p_racp_val->operand_len = 0; 21 | p_racp_val->p_operand = NULL; 22 | 23 | if (data_len > 0) 24 | { 25 | p_racp_val->opcode = p_data[0]; 26 | } 27 | if (data_len > 1) 28 | { 29 | p_racp_val->operator = p_data[1]; //lint !e415 30 | } 31 | if (data_len > 2) 32 | { 33 | p_racp_val->operand_len = data_len - 2; 34 | p_racp_val->p_operand = &p_data[2]; //lint !e416 35 | } 36 | } 37 | 38 | 39 | uint8_t ble_racp_encode(const ble_racp_value_t * p_racp_val, uint8_t * p_data) 40 | { 41 | uint8_t len = 0; 42 | int i; 43 | 44 | if (p_data != NULL) 45 | { 46 | p_data[len++] = p_racp_val->opcode; 47 | p_data[len++] = p_racp_val->operator; 48 | 49 | for (i = 0; i < p_racp_val->operand_len; i++) 50 | { 51 | p_data[len++] = p_racp_val->p_operand[i]; 52 | } 53 | } 54 | 55 | return len; 56 | } 57 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/ble/ble_radio_notification.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | */ 11 | 12 | #include "ble_radio_notification.h" 13 | #include 14 | 15 | 16 | static bool m_radio_active = false; /**< Current radio state. */ 17 | static ble_radio_notification_evt_handler_t m_evt_handler = NULL; /**< Application event handler for handling Radio Notification events. */ 18 | 19 | 20 | void SWI1_IRQHandler(void) 21 | { 22 | m_radio_active = !m_radio_active; 23 | if (m_evt_handler != NULL) 24 | { 25 | m_evt_handler(m_radio_active); 26 | } 27 | } 28 | 29 | 30 | uint32_t ble_radio_notification_init(nrf_app_irq_priority_t irq_priority, 31 | nrf_radio_notification_distance_t distance, 32 | ble_radio_notification_evt_handler_t evt_handler) 33 | { 34 | uint32_t err_code; 35 | 36 | m_evt_handler = evt_handler; 37 | 38 | // Initialize Radio Notification software interrupt 39 | err_code = sd_nvic_ClearPendingIRQ(SWI1_IRQn); 40 | if (err_code != NRF_SUCCESS) 41 | { 42 | return err_code; 43 | } 44 | 45 | err_code = sd_nvic_SetPriority(SWI1_IRQn, irq_priority); 46 | if (err_code != NRF_SUCCESS) 47 | { 48 | return err_code; 49 | } 50 | 51 | err_code = sd_nvic_EnableIRQ(SWI1_IRQn); 52 | if (err_code != NRF_SUCCESS) 53 | { 54 | return err_code; 55 | } 56 | 57 | // Configure the event 58 | return sd_radio_notification_cfg_set(NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH, distance); 59 | } 60 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/ble/ble_sensorsim.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #include "ble_sensorsim.h" 14 | 15 | 16 | void ble_sensorsim_init(ble_sensorsim_state_t * p_state, 17 | const ble_sensorsim_cfg_t * p_cfg) 18 | { 19 | if (p_cfg->start_at_max) 20 | { 21 | p_state->current_val = p_cfg->max; 22 | p_state->is_increasing = false; 23 | } 24 | else 25 | { 26 | p_state->current_val = p_cfg->min; 27 | p_state->is_increasing = true; 28 | } 29 | } 30 | 31 | 32 | uint32_t ble_sensorsim_measure(ble_sensorsim_state_t * p_state, 33 | const ble_sensorsim_cfg_t * p_cfg) 34 | { 35 | if (p_state->is_increasing) 36 | { 37 | if (p_cfg->max - p_state->current_val > p_cfg->incr) 38 | { 39 | p_state->current_val += p_cfg->incr; 40 | } 41 | else 42 | { 43 | p_state->current_val = p_cfg->max; 44 | p_state->is_increasing = false; 45 | } 46 | } 47 | else 48 | { 49 | if (p_state->current_val - p_cfg->min > p_cfg->incr) 50 | { 51 | p_state->current_val -= p_cfg->incr; 52 | } 53 | else 54 | { 55 | p_state->current_val = p_cfg->min; 56 | p_state->is_increasing = true; 57 | } 58 | } 59 | return p_state->current_val; 60 | } 61 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/ble/ble_srv_common.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #include "ble_srv_common.h" 14 | #include 15 | #include "nordic_common.h" 16 | #include "app_error.h" 17 | 18 | 19 | uint8_t ble_srv_report_ref_encode(uint8_t * p_encoded_buffer, 20 | const ble_srv_report_ref_t * p_report_ref) 21 | { 22 | uint8_t len = 0; 23 | 24 | p_encoded_buffer[len++] = p_report_ref->report_id; 25 | p_encoded_buffer[len++] = p_report_ref->report_type; 26 | 27 | APP_ERROR_CHECK_BOOL(len == BLE_SRV_ENCODED_REPORT_REF_LEN); 28 | return len; 29 | } 30 | 31 | 32 | void ble_srv_ascii_to_utf8(ble_srv_utf8_str_t * p_utf8, char * p_ascii) 33 | { 34 | p_utf8->length = (uint16_t)strlen(p_ascii); 35 | p_utf8->p_str = (uint8_t *)p_ascii; 36 | } 37 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/nrf_assert/nrf_assert.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2006 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | #include "nrf_assert.h" 13 | 14 | #if defined(DEBUG_NRF) 15 | void assert_nrf_callback(uint16_t line_num, const uint8_t *file_name) 16 | { 17 | (void) file_name; /* Unused parameter */ 18 | (void) line_num; /* Unused parameter */ 19 | 20 | while (1) ; 21 | } 22 | #endif /* DEBUG_NRF */ 23 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/nrf_delay/nrf_delay.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | */ 12 | 13 | #include "compiler_abstraction.h" 14 | #include "nrf.h" 15 | #include "nrf_delay.h" 16 | 17 | /*lint --e{438} "Variable not used" */ 18 | void nrf_delay_ms(uint32_t volatile number_of_ms) 19 | { 20 | while(number_of_ms != 0) 21 | { 22 | number_of_ms--; 23 | nrf_delay_us(999); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/nrf_ecb/nrf_ecb.c: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2012 Nordic Semiconductor. All Rights Reserved. 2 | * 3 | * The information contained herein is property of Nordic Semiconductor ASA. 4 | * Terms and conditions of usage are described in detail in NORDIC 5 | * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 6 | * 7 | * Licensees are granted free, non-transferable use of the information. NO 8 | * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 9 | * the file. 10 | * 11 | * $LastChangedRevision: 22116 $ 12 | */ 13 | 14 | /** 15 | * @file 16 | * @brief Implementation of AES ECB driver 17 | */ 18 | 19 | 20 | //lint -e438 21 | 22 | #include 23 | #include 24 | #include 25 | #include "nrf.h" 26 | #include "nrf_ecb.h" 27 | 28 | static uint8_t ecb_data[48]; ///< ECB data structure for RNG peripheral to access. 29 | static uint8_t* ecb_key; ///< Key: Starts at ecb_data 30 | static uint8_t* ecb_cleartext; ///< Cleartext: Starts at ecb_data + 16 bytes. 31 | static uint8_t* ecb_ciphertext; ///< Ciphertext: Starts at ecb_data + 32 bytes. 32 | 33 | bool nrf_ecb_init(void) 34 | { 35 | ecb_key = ecb_data; 36 | ecb_cleartext = ecb_data + 16; 37 | ecb_ciphertext = ecb_data + 32; 38 | 39 | NRF_ECB->ECBDATAPTR = (uint32_t)ecb_data; 40 | return true; 41 | } 42 | 43 | 44 | bool nrf_ecb_crypt(uint8_t * dest_buf, const uint8_t * src_buf) 45 | { 46 | uint32_t counter = 0x1000000; 47 | if(src_buf != ecb_cleartext) 48 | { 49 | memcpy(ecb_cleartext,src_buf,16); 50 | } 51 | NRF_ECB->EVENTS_ENDECB = 0; 52 | NRF_ECB->TASKS_STARTECB = 1; 53 | while(NRF_ECB->EVENTS_ENDECB == 0) 54 | { 55 | counter--; 56 | if(counter == 0) 57 | { 58 | return false; 59 | } 60 | } 61 | NRF_ECB->EVENTS_ENDECB = 0; 62 | if(dest_buf != ecb_ciphertext) 63 | { 64 | memcpy(dest_buf,ecb_ciphertext,16); 65 | } 66 | return true; 67 | } 68 | 69 | void nrf_ecb_set_key(const uint8_t * key) 70 | { 71 | memcpy(ecb_key,key,16); 72 | } 73 | 74 | 75 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/templates/gcc/Makefile.windows: -------------------------------------------------------------------------------- 1 | ifeq ($(findstring 86, $(ProgramFiles)), ) 2 | PROGFILES := C:/Program Files 3 | else 4 | PROGFILES := C:/Program Files (x86) 5 | endif 6 | 7 | GNU_INSTALL_ROOT := $(PROGFILES)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI 8 | GNU_VERSION := 4.6.3 9 | GNU_PREFIX := arm-none-eabi 10 | 11 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/templates/gcc/gcc_nrf51_blank_xxaa.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | MEMORY 3 | { 4 | FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K 5 | RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 16K 6 | } 7 | 8 | INCLUDE "gcc_nrf51_common.ld" 9 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/templates/gcc/gcc_nrf51_blank_xxab.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | MEMORY 3 | { 4 | FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 128K 5 | RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 16K 6 | } 7 | 8 | INCLUDE "gcc_nrf51_common.ld" 9 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/templates/gcc/gcc_nrf51_s110_xxaa.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | MEMORY 3 | { 4 | FLASH (rx) : ORIGIN = 0x14000, LENGTH = 0x2C000 5 | /* 80 kB is taken by S110, 176 kB available for application. */ 6 | RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x2000 7 | /* 8 kB, 8 kB is taken by S110. */ 8 | } 9 | INCLUDE "gcc_nrf51_common.ld" 10 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/templates/gcc/gcc_nrf51_s110_xxab.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | MEMORY 3 | { 4 | FLASH (rx) : ORIGIN = 0x14000, LENGTH = 0xC000 5 | /* 80 kB is taken by S110, 48 kB available for application. */ 6 | RAM (rwx) : ORIGIN = 0x20002000, LENGTH = 0x2000 7 | /* 8 kB, 8 kB is taken by S110. */ 8 | } 9 | INCLUDE "gcc_nrf51_common.ld" 10 | -------------------------------------------------------------------------------- /lib/nrf51sdk/Nordic/nrf51822/Source/templates/gcc/gcc_nrf51_s210_xxaa.ld: -------------------------------------------------------------------------------- 1 | /* Linker script to configure memory regions. */ 2 | MEMORY 3 | { 4 | FLASH (rx) : ORIGIN = 0x0000A000, LENGTH = 216K 5 | RAM (rwx) : ORIGIN = 0x20000800, LENGTH = 14K 6 | } 7 | INCLUDE "gcc_nrf51_common.ld" 8 | --------------------------------------------------------------------------------