This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import "JTouchID.h" | |
| #import <LocalAuthentication/LocalAuthentication.h> | |
| int32_t touchid_supported(void) { | |
| BOOL supportsTouchID = [[LAContext new] canEvaluatePolicy:LAPolicyDeviceOwnerAuthenticationWithBiometrics error:nil]; | |
| NSLog(@"Supports TouchID: %d", supportsTouchID); | |
| return supportsTouchID; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #import <Foundation/Foundation.h> | |
| // Functions called from Java using JNI or JNA need to follow C calling conventions | |
| typedef void (*auth_cb_t)(int32_t success, int32_t laError); | |
| #ifdef __cplusplus | |
| extern "C" { | |
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.classycode.touchidexample; | |
| import com.sun.jna.Native; | |
| import javax.swing.*; | |
| import java.awt.*; | |
| public class Main { | |
| private JButton button; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| typedef struct { | |
| uint8_t beacon_uuid[16]; | |
| uint16_t beacon_major; | |
| uint16_t beacon_minor; | |
| } configuration_t; | |
| uint32_t nvconfig_init(); | |
| uint32_t nvconfig_save(configuration_t* cfg); | |
| uint32_t nvconfig_load(configuration_t* cfg); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Types of commands received | |
| typedef enum { | |
| CONFIGURATION, | |
| INFORMATION | |
| } uart_cmd_evt_type_t; | |
| // Event data structure | |
| typedef struct { | |
| uart_cmd_evt_type_t evt_type; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "uart_cmd.h" | |
| #include <stdbool.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <nrf_uart.h> | |
| #include <app_uart.h> | |
| #include "hex_utils.h" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static ble_gap_adv_params_t m_adv_params; | |
| static uint8_t m_beacon_info[APP_BEACON_INFO_LENGTH]; | |
| static ble_advdata_manuf_data_t m_manuf_specific_data; | |
| void advertising_start(uint8_t *beacon_uuid, uint16_t major, uint16_t minor) { | |
| uint32_t err_code; | |
| ble_advdata_t adv_data; | |
| uint8_t flags = BLE_GAP_ADV_FLAG_BR_EDR_NOT_SUPPORTED; | |
| uint16_t short_val; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" ?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>LSMinimumSystemVersion</key> | |
| <string>10.9</string> | |
| <key>CFBundleDevelopmentRegion</key> | |
| <string>English</string> | |
| <key>CFBundleAllowMixedLocalizations</key> | |
| <true/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PROCESSOR 6502 | |
| INCLUDE "vcs.h" | |
| INCLUDE "macro.h" | |
| NUM_SCANLINES = 242 ; 242 scanlines for PAL, 192 for NTSC | |
| ORG $F000 ; Start of "cart area" (see Atari memory map) | |
| ; Vertical sync |
NewerOlder