1 /* 2 Copyright (c) NDS Limited 2010 3 4 P R O P R I E T A R Y & C O N F I D E N T I A L 5 6 The copyright of this code and related documentation together with 7 any other associated intellectual property rights are vested in 8 NDS Limited and may not be used except in accordance with the terms 9 of the license that you have entered into with NDS Limited. 10 Use of this material without an express license from NDS Limited 11 shall be an infringement of copyright and any other intellectual 12 property rights that may be incorporated with this material. 13 */ 14 15 #ifndef H_NSK_282 16 #define H_NSK_282 17 18 /** 19 * @mainpage NSK2 API - HDI CA API for NSK2 Chips 20 * 21 * @author Reuben Sumner, Julia Rabinovich 22 * @date 27/11/2012 23 * @version 4.04 24 * 25 * @file nsk_282.h 26 27 * @brief NSK2 API - HDI CA API for NSK2 Chips 28 29 * This file contains the definitions and functions of the NSK2 High Level Driver Interface 30 * 31 */ 32 33 #include "ndstypes.h" 34 #include "nsk_3014.h" 35 36 /** 37 * @addtogroup NSK2HDI_COMMON Common Definitions 38 * @{ 39 */ 40 /** 41 * @addtogroup NSK2HDI_TYPEDEFS Typedefs 42 * @{ 43 */ 44 typedef NDS_ULONG NSK2HDI_STATUS; /*!< @brief NSK2 interface return status */ 45 typedef void* NSK2HDI_HANDLE; /*!< @brief NSK2 device handle */ 46 typedef NDS_ULONG NSK2HDI_DEVICE_ID; /*!< @brief NSK2 device ID */ 47 48 /** @brief The NSK2HDI_CHILD_DEVICE structure is used to get/set child device information 49 */ 50 typedef struct _NSK2HDI_CHILD_DEVICE{ 51 NSK2HDI_DEVICE_ID device_id; /*!< @brief Child device ID. Must be unique in the entire system*/ 52 NDS_ULONG device_type; /*!< @brief Child device type. See possible values in \ref NSK2HDI_DEVICE_TYPE. */ 53 } NSK2HDI_CHILD_DEVICE; 54 55 /** 56 * @addtogroup NSK2HDI_STATUS Return Values 57 * @{ 58 */ 59 60 #define NSK2HDI_STATUS_OK 0x00000000U /*!< @brief Success status*/ 61 #define NSK2HDI_STATUS_INVALID_REQUEST 0x00000001U /*!< @brief Failure status - one ore more input parameters are invalid*/ 62 #define NSK2HDI_STATUS_FAILED 0x000000FFU /*!< @brief Failure status - general error */ 63 /** @} 64 * End of NSK2HDI_STATUS group belonging 65 */ 66 67 /** 68 * @addtogroup NSK2HDI_DEFINES Special Values 69 * @{ 70 */ 71 #define NSK2HDI_ILLEGAL_HANDLE (NSK2HDI_HANDLE)NULL /*!< @brief The valid handle value should always be different from this value */ 72 #define NSK2HDI_CHILD_DEVICE_ID_MASK 0xFF000000U /*!< @brief The mask used for creating child device IDs */ 73 #define NSK2HDI_INVALID_PID 0xFFFF 74 #define NSK2HDI_INVALID_CONNECTION 0xFFFFFFFFL 75 /** @} 76 * End of NSK2HDI_DEFINES group belonging 77 */ 78 79 /** 80 * @addtogroup NSK2HDI_DEVICE_TYPE Device types 81 * @{ 82 */ 83 #define NSK2HDI_CA_SOC_DEVICE_TYPE 0x00000001U /*!< @brief CA SoC device */ 84 #define NSK2HDI_OTP_DEVICE_TYPE 0x00000002U /*!< @brief OTP device */ 85 #define NSK2HDI_NSK_DEVICE_TYPE 0x00000003U /*!< @brief NSK device */ 86 #define NSK2HDI_CMCHANNEL_TABLE_DEVICE_TYPE 0x00000004U /*!< @brief CM Channel Table device */ 87 #define NSK2HDI_CMCHANNEL_GROUP_DEVICE_TYPE 0x00000005U /*!< @brief CM Channel Group device */ 88 #define NSK2HDI_CMCHANNEL_DEVICE_TYPE 0x00000006U /*!< @brief CM Channel device */ 89 #define NSK2HDI_CA_PID_PROXY_DEVICE_TYPE 0x00000007U /*!< @brief CA PID Proxy device */ 90 #define NSK2HDI_M2MTABLE_DEVICE_TYPE 0x00000008U /*!< @brief M2M Table device */ 91 #define NSK2HDI_M2MCHANNEL_GROUP_DEVICE_TYPE 0x00000009U /*!< @brief M2M Channel Group device */ 92 #define NSK2HDI_M2MCHANNEL_DEVICE_TYPE 0x0000000AU /*!< @brief M2M Channel device */ 93 #define NSK2HDI_DMA_DEVICE_TYPE 0x0000000BU /*!< @brief DMA device */ 94 95 /** @} 96 * End of NSK2HDI_DEVICE_TYPE group belonging 97 */ 98 99 /** @brief NSK2 HDI drivers device configuration callback function 100 */ 101 typedef void HDINSK2_ENUMERATION_CHANGE_CB_FN ( NSK2HDI_HANDLE device_handle, void *cookie); 102 103 /** @} 104 * End of NSK2HDI_TYPEDEFS group belonging 105 */ 106 /** @} 107 * End of NSK2HDI_COMMON group belonging 108 */ 109 110 /** 111 * @addtogroup NSK2HDI_CA_DEVICES CA Devices 112 * @{ 113 */ 114 115 116 /** 117 ** @addtogroup NSK2HDI_CA_SoC CA SoC Group Device 118 ** @{ 119 */ 120 121 /*===========================================================================*/ 122 /** @brief Creates an instance of the CA SoC Group device and returns its handle to the caller. 123 124 @param[in] CaSoCGroup_ID - the ID of the CA SoC Group device to open as provided during the SoC device registration. 125 @param[out] CaSoCGroup_handle - pointer to the device instance handle to be returned to a caller. 126 127 @retval #NSK2HDI_STATUS_OK if device instance is created successfully or 128 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 129 @retval #NSK2HDI_STATUS_FAILED if request failed. 130 */ 131 typedef NSK2HDI_STATUS NSK2HDI_CaSoCGroupDevice_Open (NSK2HDI_DEVICE_ID CaSoCGroup_ID, 132 NSK2HDI_HANDLE *CaSoCGroup_handle); 133 134 135 /*===========================================================================*/ 136 /** @brief Destroys the specified instance of the CA SoC Group device. 137 Releases all the resources used by this device instance. 138 139 @param[in] CaSoCGroup_handle - handle of the device instance to be destroyed. 140 141 @retval #NSK2HDI_STATUS_OK if the device instance was destroyed or 142 @retval #NSK2HDI_STATUS_INVALID_REQUEST if an invalid device handle was passed. 143 */ 144 typedef NSK2HDI_STATUS NSK2HDI_CaSoCGroupDevice_Close ( NSK2HDI_HANDLE CaSoCGroup_handle); 145 146 147 /*===========================================================================*/ 148 /** @brief Enumerates CA SoC Group device children. Retrieves number of children and associated info for each child. 149 If child_device_num is zero, the function is used to retrieve the number of children only and the child_device parameter is ignored. 150 151 @param[in] CaSoCGroup_handle - a handle to the opened CA SoC Group device. 152 @param[in, out] child_device_num - the number of elements in the child_device array allocated by the caller as an input,the actual number of the CA SoC Group child devices as an output 153 @param[out] child_device - array that receives the child info for the CA SoC Group child devices. 154 155 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 156 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 157 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 158 */ 159 160 161 typedef NSK2HDI_STATUS NSK2HDI_CaSoCGroupDevice_EnumerateChildren( NSK2HDI_HANDLE CaSoCGroup_handle, 162 NDS_ULONG *child_device_num, 163 NSK2HDI_CHILD_DEVICE *child_device); 164 165 166 /*===========================================================================*/ 167 /** @brief Registers the callback function for CA SoC Group device configuration changes. 168 This method can be called once during the device instance life cycle. 169 170 @param[in] CaSoCGroup_handle - a handle to the opened CA SoC Group device. 171 @param[in] cb_routine - pointer to the #HDINSK2_ENUMERATION_CHANGE_CB_FN function. 172 @param[in] cookie - a pointer that will be returned to the caller when the cb_routine is called. 173 174 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 175 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 176 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 177 */ 178 typedef NSK2HDI_STATUS NSK2HDI_CaSoCGroupDevice_RegisterEnumerationChangeCB ( NSK2HDI_HANDLE CaSoCGroup_handle, 179 HDINSK2_ENUMERATION_CHANGE_CB_FN *cb_routine, 180 void *cookie); 181 182 /** @} 183 * End of NSK2HDI_CA_SoC group belonging 184 */ 185 186 187 /** 188 ** @addtogroup NSK2HDI_OTP OTP Device 189 ** @{ 190 */ 191 /** 192 * @addtogroup NSK2HDI_OTP_COMMON OTP Definitions 193 * @{ 194 */ 195 196 /** 197 ** @addtogroup NSK2HDI_OTP_GET_PROPERTIES_REQUEST OTP Request IDs 198 ** @{ 199 */ 200 #define NSK2HDI_OTP_READ_ALL_DESCRIPTORS_REQUEST 0x00U /*!< @brief request for reading all OTP descriptors*/ 201 /** @} 202 * End of NSK2HDI_OTP_GET_PROPERTIES_REQUEST group belonging 203 */ 204 205 /** 206 ** @addtogroup NSK2HDI_OTP_DESCRIPTOR_TAGS OTP Descriptor Tags 207 ** @{ 208 */ 209 #define NSK2HDI_OTP_NDS_ID_DESC_TAG 0x20U /*!< @brief NDS serialization info descriptor*/ 210 #define NSK2HDI_OTP_NDS_BULK128_0_DESC_TAG 0x21U /*!< @brief First 128 bit bulk OTP read descriptor */ 211 #define NSK2HDI_OTP_NDS_BULK128_1_DESC_TAG 0x22U /*!< @brief Second 128 bit bulk OTP read descriptor */ 212 #define NSK2HDI_OTP_NDS_BULK128_2_DESC_TAG 0x23U /*!< @brief Third 128 bit bulk OTP read descriptor */ 213 #define NSK2HDI_OTP_NDS_BULK128_3_DESC_TAG 0x24U /*!< @brief Fourth 128 bit bulk OTP read descriptor */ 214 215 /** @} 216 * End of NSK2HDI_OTP_DESCRIPTOR_TAGS group belonging 217 */ 218 /** @} 219 * End of NSK2HDI_OTP_COMMON group belonging 220 */ 221 222 /*===========================================================================*/ 223 /** @brief Creates an instance of the OTP device and returns its handle to the caller. 224 225 @param[in] Otp_ID - the ID of the OTP device to open as returned by #NSK2HDI_CaSoCGroupDevice_EnumerateChildren function. 226 @param[out] Otp_handle - pointer to the device instance handle to be returned to a caller. 227 228 @retval #NSK2HDI_STATUS_OK if device instance is created successfully or 229 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 230 @retval #NSK2HDI_STATUS_FAILED if request failed. 231 */ 232 typedef NSK2HDI_STATUS NSK2HDI_OtpDevice_Open (NSK2HDI_DEVICE_ID Otp_ID, 233 NSK2HDI_HANDLE *Otp_handle); 234 235 236 /*===========================================================================*/ 237 /** @brief Destroys the specified instance of the OTP device. 238 Releases all the resources used by this device instance. 239 240 @param[in] Otp_handle - handle of the device instance to be destroyed. 241 242 @retval #NSK2HDI_STATUS_OK if the device instance was destroyed or 243 @retval #NSK2HDI_STATUS_INVALID_REQUEST if an invalid device handle was passed. 244 */ 245 typedef NSK2HDI_STATUS NSK2HDI_OtpDevice_Close (NSK2HDI_HANDLE Otp_handle); 246 247 248 /*===========================================================================*/ 249 /** @brief Retrieves the Properties of the OTP device. 250 If desc_size is zero, the function is used to retrieve the size of the buffer to be allocated for the properties, only and the desc parameter is ignored. 251 252 @param[in] Otp_handle - a handle to the opened OTP device. 253 @param[in] request_id - the ID of the properties retrieval request.See \ref NSK2HDI_OTP_GET_PROPERTIES_REQUEST for possible values. 254 @param[in, out] desc_size - size of the buffer allocated by the caller for the device properties. 255 @param[out] desc - pointer to the buffer receiving the descriptors with device properties. See \ref NSK2HDI_OTP_DESCRIPTOR_TAGS 256 257 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 258 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 259 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 260 */ 261 typedef NSK2HDI_STATUS NSK2HDI_OtpDevice_GetProperties( NSK2HDI_HANDLE Otp_handle, 262 NDS_ULONG request_id, 263 NDS_ULONG *desc_size, 264 NDS_UBYTE *desc); 265 266 /** @} 267 * End of NSK2HDI_OTP group belonging 268 */ 269 270 /** 271 ** @addtogroup NSK2HDI_NSK NSK Device 272 ** @{ 273 */ 274 275 /** 276 * @addtogroup NSK2HDI_NSK_COMMON NSK Definitions 277 * @{ 278 */ 279 280 /** @brief NSK2 HDI drivers event callback function 281 */ 282 typedef void HDINSK2_NSKEVENT_CB_FN (NSK2HDI_HANDLE Nsk_handle, 283 void *cookie, 284 NDS_ULONG reason, 285 NDS_ULONG acpuError); 286 287 /** 288 ** @addtogroup NSK2HDI_INITIALIZATION_STAGE NSK Device initialization stage 289 ** @{ 290 */ 291 #define NSK2HDI_INITIALIZATION_STAGE_ONE 0x01U /*!< @brief NDS serialization info*/ 292 293 /** @} 294 * End of NSK2HDI_INITIALIZATION_STAGE group belonging 295 */ 296 /** @} 297 * End of NSK2HDI_NSK_COMMON group belonging 298 */ 299 300 /*===========================================================================*/ 301 /** @brief Creates an instance of the NSK device and returns its handle to the caller. 302 303 @param[in] Nsk_ID - the ID of the NSK device to open as returned by #NSK2HDI_CaSoCGroupDevice_EnumerateChildren function. 304 @param[out] Nsk_handle - pointer to the device instance handle to be returned to a caller. 305 306 @retval #NSK2HDI_STATUS_OK if device instance is created successfully or 307 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 308 @retval #NSK2HDI_STATUS_FAILED if request failed. 309 */ 310 typedef NSK2HDI_STATUS NSK2HDI_NskDevice_Open (NSK2HDI_DEVICE_ID Nsk_ID, 311 NSK2HDI_HANDLE *Nsk_handle); 312 313 /*===========================================================================*/ 314 /** @brief Destroys the specified instance of the NSK device. 315 Releases all the resources used by this device instance. 316 317 @param[in] Nsk_handle- handle of the device instance to be destroyed. 318 319 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 320 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 321 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 322 */ 323 typedef NSK2HDI_STATUS NSK2HDI_NskDevice_Close (NSK2HDI_HANDLE Nsk_handle); 324 325 326 /*===========================================================================*/ 327 /** @brief Reads data from registers. 328 329 @param[in] Nsk_handle - a handle to the opened NSK device. 330 @param[in] register_offset - the offset within the device memory map at which to start the read. 331 @param[in] data_size - number of bytes to read, must be a positive multiple of 4. 332 @param[out] data - pointer to the buffer receiving the read data. 333 334 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 335 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 336 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 337 */ 338 339 typedef NSK2HDI_STATUS NSK2HDI_NskDevice_Read8 (NSK2HDI_HANDLE Nsk_handle, 340 NDS_ULONG register_offset, 341 NDS_ULONG data_size, 342 NDS_UBYTE *data); 343 344 345 /*===========================================================================*/ 346 /** @brief Writes data to the registers 347 348 @param[in] Nsk_handle - a handle to the opened NSK device. 349 @param[in] register_offset - the offset within the device memory map at which to start the read. 350 @param[in] data_size - number of bytes to write, must be a positive multiple of 4. 351 @param[out] data - pointer to the buffer containing the data to be written. 352 353 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 354 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 355 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 356 */ 357 typedef NSK2HDI_STATUS NSK2HDI_NskDevice_Write8 (NSK2HDI_HANDLE Nsk_handle, 358 NDS_ULONG register_offset, 359 NDS_ULONG data_size, 360 const NDS_UBYTE *data); 361 362 363 364 /*===========================================================================*/ 365 /** @brief Reads data from registers 366 367 @param[in] Nsk_handle - a handle to the opened NSK device. 368 @param[in] register_offset - the offset within the device memory map at which to start the read, must be a multiple of 4. 369 @param[in] data_size - number of 32-bits words to read. 370 @param[out] data - pointer to the buffer receiving the read data. 371 372 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 373 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 374 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 375 */ 376 typedef NSK2HDI_STATUS NSK2HDI_NskDevice_Read32 (NSK2HDI_HANDLE Nsk_handle, 377 NDS_ULONG register_offset, 378 NDS_ULONG data_size, 379 NDS_ULONG *data); 380 381 /*===========================================================================*/ 382 /** @brief Writes data to the registers 383 384 @param[in] Nsk_handle - a handle to the opened NSK device. 385 @param[in] register_offset - the offset within the device memory map at which to start writing,must be a multiple of 4. 386 @param[in] data_size - number of bytes to write. 387 @param[out] data - pointer to the buffer containing the data to be written. 388 389 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 390 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 391 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 392 */ 393 typedef NSK2HDI_STATUS NSK2HDI_NskDevice_Write32 (NSK2HDI_HANDLE Nsk_handle, 394 NDS_ULONG register_offset, 395 NDS_ULONG data_size, 396 const NDS_ULONG *data); 397 398 399 /*===========================================================================*/ 400 /** @brief Executes a single command in the NSK. 401 402 @param[in] Nsk_handle - a handle to the opened NSK device. 403 @param[in] command - data to be loaded into the NSK command register. 404 @param[in] control - data to be loaded into the NSK control register. 405 @param[in] register_offset - the offset within the device memory map at which to start data loading,must be a multiple of 4. 406 @param[in] data_size - size of the data to be loaded into the NSK registers. Must be a multiply of 4. 407 @param[in] data - buffer containing the data to be loaded into the NSK registers. 408 409 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 410 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 411 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 412 */ 413 typedef NSK2HDI_STATUS NSK2HDI_NskDevice_ExecuteCmd (NSK2HDI_HANDLE Nsk_handle, 414 NDS_ULONG command, 415 NDS_ULONG control, 416 NDS_ULONG register_offset, 417 NDS_ULONG data_size, 418 const NDS_UBYTE *data); 419 420 421 /*===========================================================================*/ 422 /** @brief Registers the callback function for NSK events. 423 This method can be called once during the device instance life cycle. 424 425 @param[in] Nsk_handle - a handle to the opened NSK device. 426 @param[in] cb_routine - pointer to the #HDINSK2_NSKEVENT_CB_FN function. 427 @param[in] cookie - a pointer that will be returned to the caller when the cb_routine is called. 428 429 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 430 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 431 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 432 */ 433 typedef NSK2HDI_STATUS NSK2HDI_NskDevice_RegisterEventCB ( NSK2HDI_HANDLE Nsk_handle, 434 HDINSK2_NSKEVENT_CB_FN *cb_routine, 435 void *cookie); 436 437 438 /*===========================================================================*/ 439 /** @brief Sends an acknowledgment signal to the NSK that the NSK chip has finished using the KTE contents. 440 441 @param[in] Nsk_handle - a handle to the opened NSK device. 442 443 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 444 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 445 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 446 */ 447 typedef NSK2HDI_STATUS NSK2HDI_NskDevice_AcknowledgeKte(NSK2HDI_HANDLE Nsk_handle); 448 449 /*===========================================================================*/ 450 /** @brief Called to indicate that NSK basic initialization is complete. 451 452 @param[in] Nsk_handle - a handle to the opened NSK device. 453 @param[in] stage - initialization stage. See \ref NSK2HDI_INITIALIZATION_STAGE for possible values. 454 455 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 456 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 457 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 458 */ 459 typedef NSK2HDI_STATUS NSK2HDI_NskDevice_BasicInitializationComplete( NSK2HDI_HANDLE Nsk_handle, NDS_ULONG stage); 460 461 /** @} 462 * End of NSK2HDI_NSK group belonging 463 */ 464 465 466 467 /** 468 ** @addtogroup NSK2HDI_CM Content Module Devices 469 ** @{ 470 */ 471 /** 472 ** @addtogroup NSK2HDI_CMCHANNELTABLE CmChannel Table Device 473 ** @{ 474 */ 475 476 /*===========================================================================*/ 477 /** @brief Creates an instance of the CmChannel Table device and returns its handle to the caller. 478 479 @param[in] CmChannelTable_ID - the ID of theCmChannel Table device to open as returned by #NSK2HDI_CaSoCGroupDevice_EnumerateChildren function. 480 @param[out] CmChannelTable_handle - pointer to the device instance handle to be returned to a caller. 481 482 @retval #NSK2HDI_STATUS_OK if device instance is created successfully or 483 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 484 @retval #NSK2HDI_STATUS_FAILED if request failed. 485 */ 486 typedef NSK2HDI_STATUS NSK2HDI_CmChannelTableDevice_Open ( NSK2HDI_DEVICE_ID CmChannelTable_ID, 487 NSK2HDI_HANDLE *CmChannelTable_handle); 488 489 /*===========================================================================*/ 490 /** @brief Destroys the specified instance of the CmChannel Table device. 491 Releases all the resources used by this device instance. 492 493 @param[in] CmChannelTable_handle - handle of the device instance to be destroyed. 494 495 @retval #NSK2HDI_STATUS_OK if the device instance was destroyed or 496 @retval #NSK2HDI_STATUS_INVALID_REQUEST if an invalid device handle was passed. 497 */ 498 typedef NSK2HDI_STATUS NSK2HDI_CmChannelTableDevice_Close ( NSK2HDI_HANDLE CmChannelTable_handle); 499 500 501 /*===========================================================================*/ 502 /** @brief Enumerates CmChannel Table device children. Retrieves number of children and associated info for each child. 503 If child_device_num is zero, the function is used to retrieve the number of children only and the child_device parameter is ignored. 504 505 @param[in] CmChannelTable_handle - a handle to the opened CmChannel Table device. 506 @param[in, out] child_device_num - the number of elements in the child_device array allocated by the caller as an input, the actual number of the CmChannel Table child devices as an output. 507 @param[out] child_device - array that receives the child info for the CmChannel Table child devices. 508 509 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 510 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 511 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 512 */ 513 514 typedef NSK2HDI_STATUS NSK2HDI_CmChannelTableDevice_EnumerateChildren( NSK2HDI_HANDLE CmChannelTable_handle, 515 NDS_ULONG *child_device_num, 516 NSK2HDI_CHILD_DEVICE *child_device); 517 518 519 /** @} 520 * End of NSK2HDI_CMCHANNELTABLE group belonging 521 */ 522 /** 523 ** @addtogroup NSK2HDI_CMCHANNELGROUP CmChannel Group Device 524 ** @{ 525 */ 526 /** 527 ** @addtogroup NSK2HDI_CMCHANNELGROUP_DEFS CmChannel Group Definitions 528 ** @{ 529 */ 530 #define NSK2HDI_CMCHANNELGROUP_MAX_USER_CONTEXT_LENGTH 0x08U /*!< @brief the size of the user context field */ 531 /** 532 ** @addtogroup NSK2HDI_CMCHANNEL_PARITY_FLAGS CmChannel Parity Flags 533 ** @{ 534 */ 535 #define NSK2HDI_CMCHANNEL_CLEAR_PARITY 0x01U /*!< @brief the key can be set for the clear parity */ 536 #define NSK2HDI_CMCHANNEL_EVEN_PARITY 0x02U /*!< @brief the key can be set for the even parity */ 537 #define NSK2HDI_CMCHANNEL_EVEN_CLEAR_PARITY 0x04U /*!< @brief the same key can be set for the clear and even parity */ 538 #define NSK2HDI_CMCHANNEL_ODD_PARITY 0x08U /*!< @brief the key can be set for the odd parity */ 539 #define NSK2HDI_CMCHANNEL_ODD_CLEAR_PARITY 0x10U /*!< @brief the same key can be set for the clear and odd parity */ 540 #define NSK2HDI_CMCHANNEL_ODD_EVEN_PARITY 0x20U /*!< @brief the same key can be set for the odd and even parity */ 541 #define NSK2HDI_CMCHANNEL_ODD_EVEN_CLEAR_PARITY 0x40U /*!< @brief the same key can be set for the clear, odd and even parity */ 542 /** @} 543 * End of NSK2HDI_CMCHANNEL_PARITY_FLAGS group belonging 544 */ 545 /** 546 ** @addtogroup NSK2HDI_CMCHANNEL_SWITCH CmChannel Switch Flags 547 ** @{ 548 */ 549 #define NSK2HDI_CMCHANNEL_AL_SWITCH_THRU 0x01U /*!< @brief If not set, AL switch is by-passed */ 550 #define NSK2HDI_CMCHANNEL_BL_SWITCH_THRU 0x02U /*!< @brief If not set, BL switch is by-passed */ 551 #define NSK2HDI_CMCHANNEL_DL_SWITCH_THRU 0x04U /*!< @brief If not set, DL switch is by-passed */ 552 #define NSK2HDI_CMCHANNEL_EL_SWITCH_THRU 0x08U /*!< @brief If not set, packet is not delivered to the lower destination */ 553 #define NSK2HDI_CMCHANNEL_AU_SWITCH_THRU 0x10U /*!< @brief If not set, AU switch is by-passed */ 554 #define NSK2HDI_CMCHANNEL_BU_SWITCH_THRU 0x20U /*!< @brief If not set, BU switch is by-passed */ 555 #define NSK2HDI_CMCHANNEL_DU_SWITCH_THRU 0x40U /*!< @brief If not set, DU switch is by-passed */ 556 #define NSK2HDI_CMCHANNEL_EU_SWITCH_THRU 0x80U /*!< @brief If not set, packet is not delivered to the upper destination */ 557 /** @} 558 * End of NSK2HDI_CMCHANNEL_SWITCH group belonging 559 */ 560 561 562 /** @addtogroup NSK2HDI_CMCHANNEL_ALGORITHM_TYPE CmChannel Algorithm Types 563 ** @{ 564 */ 565 #define NSK2HDI_CMCHANNEL_LSA_ALGORITHM_TYPE 0x01U /*!< @brief LSA algrorithm */ 566 #define NSK2HDI_CMCHANNEL_ESA_ALGORITHM_TYPE 0x02U /*!< @brief ESA algrorithm */ 567 #define NSK2HDI_CMCHANNEL_LDA_ALGORITHM_TYPE 0x03U /*!< @brief LDA algrorithm */ 568 /** @} 569 * End of NSK2HDI_CMCHANNEL_ALGORITHM_TYPE group belonging 570 */ 571 572 /** 573 ** @addtogroup NSK2HDI_CMCHANNEL_CAPABILITY_FLAGS CmChannel Capability Flags 574 ** @{ 575 */ 576 #define NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG 0x01U /*!< @brief if set, CmChannel may be configured with the explicit IV1 via NSK2HDI_CmChannelDevice_Configure*/ 577 #define NSK2HDI_CMCHANNEL_IV2_CONFIGURE_CAPABILITY_FLAG 0x02U /*!< @brief if set, CmChannel may be configured with the explicit IV2 via NSK2HDI_CmChannelDevice_Configure*/ 578 #define NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG 0x04U /*!< @brief if set, explicit IV and/or IV2 may be loaded into CmChannel via NSK2HDI_CmChannelDevice_WriteTransportKey.*/ 579 #define NSK2HDI_CMCHANNEL_NON_NSK_CAPABILITY_FLAG 0x08U /*!< @brief if set, may use CmChannel with keys and switches from non-NSK source. Not used in HDI, reserved for use in CDI. */ 580 #define NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG 0x10U /*!< @brief if set, may use CmChannel with NSK (via NSK2HDI_CmChannel_WriteTransportKey) .if not set, may use CmChannel with keys and switches from non-NSK source. Not used in HDI, reserved for use in CDI. */ 581 /** @} 582 * End of NSK2HDI_CMCHANNEL_CAPABILITY_FLAGS group belonging 583 */ 584 585 586 /** 587 ** @addtogroup NSK2HDI_CMCHANNELGROUP_REQUEST_IDS CmChannel Group Request IDs 588 ** @{ 589 */ 590 #define NSK2HDI_CMCHANNELGROUP_READ_ALL_DESCRIPTORS_REQUEST 0x00U /*!< @brief ID of the request used for retrieving all CmChannelGroup properties */ 591 /** @} 592 * End of NSK2HDI_CMCHANNELGROUP_REQUEST_IDS group belonging 593 */ 594 595 /** 596 ** @addtogroup NSK2HDI_CMCHANNELGROUP_DESC CmChannel Group Descriptor Tags 597 ** @{ 598 */ 599 #define NSK2HDI_CMCHANNELGROUP_CAPABILITY_DESC_TAG 0x01U /*!< @brief Tag of the descriptor carrying the capability flags. */ 600 #define NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG 0x02U /*!< @brief Tag of the descriptor carrying the CmChannel LDA record information. There is one record per each pair of node and algorithm supported by CmChannel*/ 601 /** @} 602 * End of NSK2HDI_CMCHANNELGROUP_DESC group belonging 603 */ 604 605 /** @} 606 * End of NSK2HDI_CMCHANNELGROUP_DEFS group belonging 607 */ 608 609 /*===========================================================================*/ 610 /** @brief Creates an instance of the CmChannel Group device and returns its handle to the caller. 611 612 @param[in] CmChannelGroup_ID - the ID of the CmChannel Group device to open as returned by #NSK2HDI_CmChannelTableDevice_EnumerateChildren function. 613 @param[out] CmChannelGroup_handle - pointer to the device instance handle to be returned to a caller. 614 615 @retval #NSK2HDI_STATUS_OK if device instance is created successfully or 616 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 617 @retval #NSK2HDI_STATUS_FAILED if request failed. 618 */ 619 typedef NSK2HDI_STATUS NSK2HDI_CmChannelGroupDevice_Open ( NSK2HDI_DEVICE_ID CmChannelGroup_ID, 620 NSK2HDI_HANDLE *CmChannelGroup_handle); 621 622 /*===========================================================================*/ 623 /** @brief Destroys the specified instance of the CmChannel Group device. 624 Releases all the resources used by this device instance. 625 626 @param[in] CmChannelGroup_handle - handle of the device instance to be destroyed. 627 628 @retval #NSK2HDI_STATUS_OK if the device instance was destroyed or 629 @retval #NSK2HDI_STATUS_INVALID_REQUEST if an invalid device handle was passed. 630 */ 631 typedef NSK2HDI_STATUS NSK2HDI_CmChannelGroupDevice_Close ( NSK2HDI_HANDLE CmChannelGroup_handle); 632 633 634 /*===========================================================================*/ 635 /** @brief Retrieves the Properties of the CmChannel Group device. 636 If desc_size is zero, the function is used to retrieve the size of the buffer to be allocated for the properties, only and the desc parameter is ignored. 637 638 @param[in] CmChannelGroup_handle - a handle to the opened CmChannel Group device. 639 @param[in] request_id - the ID of the properties retrieval request.See \ref NSK2HDI_CMCHANNELGROUP_REQUEST_IDS for possible values. 640 @param[in, out] desc_size - size of the buffer allocated by the caller for the device properties as an input, actual size of the device properties returned by the device as an output. 641 @param[out] desc - pointer to the buffer receiving the device properties. 642 643 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 644 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 645 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 646 */ 647 typedef NSK2HDI_STATUS NSK2HDI_CmChannelGroupDevice_GetProperties( NSK2HDI_HANDLE CmChannelGroup_handle, 648 NDS_ULONG request_id, 649 NDS_ULONG *desc_size, 650 NDS_UBYTE *desc); 651 652 /** @} 653 * End of NSK2HDI_CMCHANNELGROUP group belonging 654 */ 655 656 /** 657 ** @addtogroup NSK2HDI_CMCHANNEL CmChannel Device 658 ** @{ 659 */ 660 /** 661 ** @addtogroup NSK2HDI_CMCHANNEL_DEF Definitions 662 ** @{ 663 */ 664 665 /** 666 ** @addtogroup NSK2HDI_CMCHANNEL_DESC CmChannel Descriptor Tags 667 ** @{ 668 */ 669 #define NSK2HDI_CMCHANNEL_IV1_DESC_TAG 0x01U /*!< @brief IV1 for local scrambling/descrambling. */ 670 #define NSK2HDI_CMCHANNEL_IV2_DESC_TAG 0x02U /*!< @brief IV2 for local scrambling/descrambling.*/ 671 #define NSK2HDI_CMCHANNEL_ALGORITHM_DESC_TAG 0x03U /*!< @brief algorithm for scrambling/descrambling.*/ 672 #define NSK2HDI_CMCHANNEL_IV_SIGNALING_DESC_TAG 0x04U /*!< @brief IV signaling mode.*/ 673 /** @} 674 * End of NSK2HDI_CMCHANNEL_DESC group belonging 675 */ 676 /** 677 ** @addtogroup NSK2HDI_CMCHANNEL_IV_SIGNALING_MODES CmChannel IV Signaling Modes 678 ** @{ 679 */ 680 #define NSK2HDI_CMCHANNEL_IV_NOT_SET_MODE 0x01U /*!< @brief IV1/IV2 not configured. */ 681 #define NSK2HDI_CMCHANNEL_IV_AT_CONFIG_MODE 0x02U /*!< @brief IV1/2 are defined via Configure call.*/ 682 #define NSK2HDI_CMCHANNEL_IV_AT_WRITEKEY_MODE 0x03U /*!< @brief IV1/2 are defined via WriteTransportKey call.*/ 683 /** @} 684 * End of NSK2HDI_CMCHANNEL_IV_SIGNALING_MODES group belonging 685 */ 686 687 /** @} 688 * End of NSK2HDI_CMCHANNEL_DEF group belonging 689 */ 690 691 /*===========================================================================*/ 692 /** @brief Creates an instance of the CmChannel device and returns its handle to the caller. 693 694 @param[in] CmChannelGroup_ID - the ID of the CmChannelGroup device where the requested channel belongs to 695 @param[out] CmChannel_handle - pointer to the device instance handle to be returned to a caller. 696 697 @retval #NSK2HDI_STATUS_OK if device instance is created successfully or 698 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 699 @retval #NSK2HDI_STATUS_FAILED if request failed. 700 */ 701 typedef NSK2HDI_STATUS NSK2HDI_CmChannelDevice_Open ( NSK2HDI_DEVICE_ID CmChannelGroup_ID, 702 NSK2HDI_HANDLE *CmChannel_handle); 703 704 705 /*===========================================================================*/ 706 /** @brief Destroys the specified instance of the CmChannel device. 707 Releases all the resources used by this device instance. 708 709 @param[in] CmChannel_handle - handle of the device instance to be destroyed. 710 711 @retval #NSK2HDI_STATUS_OK if the device instance was destroyed or 712 @retval #NSK2HDI_STATUS_INVALID_REQUEST if an invalid device handle was passed. 713 */ 714 typedef NSK2HDI_STATUS NSK2HDI_CmChannelDevice_Close( NSK2HDI_HANDLE CmChannel_handle); 715 716 717 /*===========================================================================*/ 718 /** @brief Configures the CmChannel device. 719 720 @param[in] CmChannel_handle - a handle to the opened CmChannel device. 721 @param[in] lda_desc_size - size of the lda descriptors buffer. 722 @param[in] lda_desc - buffer containing the descriptors configuring the local descrambler. See \ref NSK2HDI_CMCHANNEL_DESC for possible descriptors 723 @param[in] esa_desc_size - size of the esa descriptors buffer. 724 @param[in] esa_desc - buffer containing the descriptors configuring the esa descrambler. See \ref NSK2HDI_CMCHANNEL_DESC for possible descriptors 725 @param[in] lsa_desc_size - size of the lsa descriptors buffer. 726 @param[in] lsa_desc - buffer containing the descriptors configuring the local scrambler descriptors. See \ref NSK2HDI_CMCHANNEL_DESC for possible descriptors 727 728 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 729 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 730 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 731 */ 732 typedef NSK2HDI_STATUS NSK2HDI_CmChannelDevice_Configure(NSK2HDI_HANDLE CmChannel_handle, 733 NDS_ULONG lda_desc_size, 734 const NDS_UBYTE *lda_desc, 735 NDS_ULONG esa_desc_size, 736 const NDS_UBYTE *esa_desc, 737 NDS_ULONG lsa_desc_size, 738 const NDS_UBYTE *lsa_desc); 739 740 /*===========================================================================*/ 741 /** @brief Request the NSK device to copy the keys and the control switches from the NSK KTE to the NSK chip key table. 742 743 @param[in] CmChannel_handle - a handle to the opened CmChannel device. 744 @param[in] scb_in_out_size - the number of the entries in the scb_in and scb_out arrays. Each pair of the entries (scb_in[i], scb_out[i]) specifies the parity conversion between the incoming and outgoing packets. 745 @param[in] scb_in - array where each NDS_UBYTE entry signals input packet parity for which the key shall be written. 746 Each entry in array can be set to #NSK2HDI_CMCHANNEL_CLEAR_PARITY, #NSK2HDI_CMCHANNEL_ODD_PARITY or NSK2HDI_CMCHANNEL_EVEN_PARITY. 747 @param[in] scb_out - array where each NDS_UBYTE entry signals the output packet parity for the corresponding input parity signaled by scb_in array. 748 Each entry in array can be set to #NSK2HDI_CMCHANNEL_CLEAR_PARITY, #NSK2HDI_CMCHANNEL_ODD_PARITY or NSK2HDI_CMCHANNEL_EVEN_PARITY. 749 @param[in] lda_desc_size - size of the lda descriptors buffer. 750 @param[in] lda_desc - buffer containing the descriptors configuring the IVs for local descrambler. See \ref NSK2HDI_CMCHANNEL_DESC for possible descriptors 751 @param[in] esa_desc_size - size of the esa descriptors buffer. 752 @param[in] esa_desc - buffer containing the descriptors configuring the IVs for the esa descrambler. See \ref NSK2HDI_CMCHANNEL_DESC for possible descriptors 753 @param[in] lsa_desc_size - size of the lsa descriptors buffer. 754 @param[in] lsa_desc - buffer containing the descriptors configuring the the IVs for local scrambler descriptors. See \ref NSK2HDI_CMCHANNEL_DESC for possible descriptors 755 756 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 757 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 758 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 759 */ 760 typedef NSK2HDI_STATUS NSK2HDI_CmChannelDevice_WriteTransportKey( 761 NSK2HDI_HANDLE CmChannel_handle, 762 NDS_ULONG scb_in_out_size, 763 NDS_UBYTE *scb_in, 764 NDS_UBYTE *scb_out, 765 NDS_ULONG lda_desc_size, 766 const NDS_UBYTE *lda_desc, 767 NDS_ULONG esa_desc_size, 768 const NDS_UBYTE *esa_desc, 769 NDS_ULONG lsa_desc_size, 770 const NDS_UBYTE *lsa_desc); 771 772 /*===========================================================================*/ 773 /** @brief Disables scrambling and descrambling for the selected CmChannel 774 775 @param[in] CmChannel_handle - a handle to the opened CmChannel device. 776 777 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 778 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 779 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 780 */ 781 typedef NSK2HDI_STATUS NSK2HDI_CmChannelDevice_InvalidateKeys(NSK2HDI_HANDLE CmChannel_handle); 782 783 /*===========================================================================*/ 784 /** @brief Retrieves the cookie associated with CmChannel device. 785 786 @param[in] CmChannel_handle - a handle to the opened CmChannel device. 787 @param[out] cookie - pointer to the variable receiving the device cookie. 788 789 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 790 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 791 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 792 */ 793 typedef NSK2HDI_STATUS NSK2HDI_CmChannelDevice_GetCookie(NSK2HDI_HANDLE CmChannel_handle, 794 void **cookie); 795 796 /** @} 797 * End of NSK2HDI_CMCHANNEL group belonging 798 */ 799 /** 800 ** @addtogroup NSK2HDI_CAPIDPROXY CaPIDProxy Device 801 ** @{ 802 */ 803 804 /** 805 ** @addtogroup NSK2HDI_CAPIDPROXY_FLAGS CAPIDProxy Merge Mode Flags 806 ** @{ 807 */ 808 #define NSK2HDI_CAPIDPROXY_MERGED_CONTINUITY_MODE 0U /*!< @brief continuity counter shall not be modified on the merged PID */ 809 #define NSK2HDI_CAPIDPROXY_SEPARATE_CONTINUITY_MODE 1U /*!< @brief the continuity counters shall be repaced for the merged PID such that the merged PID has valid continuity counters*/ 810 /** @} 811 * End of NSK2HDI_CAPIDPROXY_FLAGS group belonging 812 */ 813 /*===========================================================================*/ 814 /** @brief Creates an instance of the CaPIDProxy device and returns its handle to the caller. 815 816 @param[in] xconn - the associated x_connection. 817 @param[out] CaPIDProxy_handle - pointer to the device instance handle to be returned to a caller. 818 819 @retval #NSK2HDI_STATUS_OK if device instance is created successfully or 820 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 821 @retval #NSK2HDI_STATUS_FAILED if request failed. 822 */ 823 typedef NSK2HDI_STATUS NSK2HDI_CaPIDProxy_Open (NDS_ULONG xconn, NSK2HDI_HANDLE *CaPIDProxy_handle); 824 825 /*===========================================================================*/ 826 /** @brief Destroys the specified instance of the CaPIDProxy device. 827 Releases all the resources used by this device instance. 828 829 @param[in] CaPIDProxy_handle - handle of the device instance to be destroyed. 830 831 @retval #NSK2HDI_STATUS_OK if the device instance was destroyed or 832 @retval #NSK2HDI_STATUS_INVALID_REQUEST if an invalid device handle was passed. 833 */ 834 typedef NSK2HDI_STATUS NSK2HDI_CaPIDProxy_Close (NSK2HDI_HANDLE CaPIDProxy_handle); 835 836 /*===========================================================================*/ 837 /** @brief Sets the PID of the elementary stream for the CaPIDProxy device. 838 839 @param[in] CaPIDProxy_handle - a handle to the opened CaPIDProxy device. 840 @param[in] es_pid - primary elementary stream PID. 841 842 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 843 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 844 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 845 */ 846 typedef NSK2HDI_STATUS NSK2HDI_CaPIDProxy_SetPrimaryStreamPID( NSK2HDI_HANDLE CaPIDProxy_handle, 847 NDS_USHORT es_pid); 848 849 /*===========================================================================*/ 850 /** @brief Sets the CmChannel associated with primary elementary stream for the CaPIDProxy device. 851 852 @param[in] CaPIDProxy_handle - a handle to the opened CaPIDProxy device. 853 @param[in] CmChannel_cookie - a cookie associated with theCmChannel device to be used with the primary stream. 854 855 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 856 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 857 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 858 */ 859 typedef NSK2HDI_STATUS NSK2HDI_CaPIDProxy_SetPrimaryStreamCmChannel(NSK2HDI_HANDLE CaPIDProxy_handle, 860 void *CmChannel_cookie); 861 862 /*===========================================================================*/ 863 /** @brief Removes the CmChannel associated with primary elementary stream for the CaPIDProxy device. 864 865 @param[in] CaPIDProxy_handle - a handle to the opened CaPIDProxy device. 866 867 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 868 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 869 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 870 */ 871 typedef NSK2HDI_STATUS NSK2HDI_CaPIDProxy_RemovePrimaryStreamCmChannel(NSK2HDI_HANDLE CaPIDProxy_handle); 872 873 /*===========================================================================*/ 874 /** @brief Configures secondary elementary stream from the CaPIDProxy device. 875 876 @param[in] CaPIDProxy_handle - a handle to the opened CaPIDProxy device. 877 @param[in] CmChannel_cookie - a cookie associated with the CmChannel device to be used with the secondary stream. 878 @param[in] es_pid - secondary elementary stream PID. 879 @param[in] merge_mode - set of flags controlling the merged stream requirements. See \ref NSK2HDI_CAPIDPROXY_FLAGS for possible values. 880 881 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 882 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 883 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 884 */ 885 typedef NSK2HDI_STATUS NSK2HDI_CaPIDProxy_SetSecondaryStream(NSK2HDI_HANDLE CaPIDProxy_handle, 886 void *CmChannel_cookie, 887 NDS_USHORT es_pid, 888 NDS_ULONG merge_mode); 889 890 /*===========================================================================*/ 891 /** @brief Removes secondary elementary stream from the CaPIDProxy device. 892 893 @param[in] CaPIDProxy_handle - a handle to the opened CaPIDProxy device. 894 895 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 896 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 897 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 898 */ 899 typedef NSK2HDI_STATUS NSK2HDI_CaPIDProxy_RemoveSecondaryStream(NSK2HDI_HANDLE CaPIDProxy_handle); 900 901 902 /** @} 903 * End of NSK2HDI_CAPIDPROXY group belonging 904 */ 905 906 /** @} 907 * End of NSK2HDI_CM group belonging 908 */ 909 910 /** 911 ** @addtogroup NSK2HDI_M2M M2M Devices 912 ** @{ 913 */ 914 /** 915 ** @addtogroup NSK2HDI_M2MTABLE M2MChannel Table Device 916 ** @{ 917 */ 918 919 /*===========================================================================*/ 920 /** @brief Creates an instance of the M2MChannel Table device and returns its handle to the caller. 921 922 @param[in] M2MTable_ID - the ID of theM2MChannel Table device to open as returned by #NSK2HDI_CaSoCGroupDevice_EnumerateChildren function. 923 @param[out] M2MTable_handle - pointer to the device instance handle to be returned to a caller. 924 925 @retval #NSK2HDI_STATUS_OK if device instance is created successfully or 926 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 927 @retval #NSK2HDI_STATUS_FAILED if request failed. 928 */ 929 typedef NSK2HDI_STATUS NSK2HDI_M2MTableDevice_Open ( NSK2HDI_DEVICE_ID M2MTable_ID, 930 NSK2HDI_HANDLE *M2MTable_handle); 931 932 /*===========================================================================*/ 933 /** @brief Destroys the specified instance of the M2MChannel Table device. 934 Releases all the resources used by this device instance. 935 936 @param[in] M2MTable_handle - handle of the device instance to be destroyed. 937 938 @retval #NSK2HDI_STATUS_OK if the device instance was destroyed or 939 @retval #NSK2HDI_STATUS_INVALID_REQUEST if an invalid device handle was passed. 940 */ 941 typedef NSK2HDI_STATUS NSK2HDI_M2MTableDevice_Close ( NSK2HDI_HANDLE M2MTable_handle); 942 943 944 /*===========================================================================*/ 945 /** @brief Enumerates M2MChannel Table device children. Retrieves number of children and associated info for each child. 946 If child_device_num is zero, the function is used to retrieve the number of children only and the child_device parameter is ignored. 947 948 @param[in] M2MTable_handle - a handle to the opened M2MChannel Table device. 949 @param[in, out] child_device_num - the number of elements in the child_device array allocated by the caller as an input, the actual number of the M2MChannel Table child devices as an output. 950 @param[out] child_device - array that receives the child info for the M2MChannel Table child devices. 951 952 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 953 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 954 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 955 */ 956 957 typedef NSK2HDI_STATUS NSK2HDI_M2MTableDevice_EnumerateChildren( NSK2HDI_HANDLE M2MTable_handle, 958 NDS_ULONG *child_device_num, 959 NSK2HDI_CHILD_DEVICE *child_device); 960 961 962 /** @} 963 * End of NSK2HDI_M2MTABLE group belonging 964 */ 965 /** 966 ** @addtogroup NSK2HDI_M2MCHANNELGROUP M2MChannel Group Device 967 ** @{ 968 */ 969 /** 970 ** @addtogroup NSK2HDI_M2MCHANNELGROUP_DEFS Definitions 971 ** @{ 972 */ 973 974 #define NSK2HDI_M2MCHANNEL_USER_CONTEXT_SIZE 0x08U /*!< @brief the size of the user context field */ 975 976 /** 977 ** @addtogroup NSK2HDI_M2MCHANNELGROUP_REQUEST_IDS M2MChannelGroup Request IDs 978 ** @{ 979 */ 980 #define NSK2HDI_M2MCHANNELGROUP_READ_ALL_DESCRIPTORS_REQUEST 0x00U /*!< @brief ID of the request used for retrieving all M2MChannelGroup properties */ 981 /** @} 982 * End of NSK2HDI_M2MCHANNELGROUP_REQUEST_IDS group belonging 983 */ 984 985 /** 986 ** @addtogroup NSK2HDI_M2MCHANNELGROUP_DESC M2MChannelGroup Descriptor Tags 987 ** @{ 988 */ 989 #define NSK2HDI_M2MCHANNELGROUP_CAPABILITY_DESC_TAG 0x01U /*!< @brief Tag of the descriptor carrying the capability flags. */ 990 #define NSK2HDI_M2MCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG 0x02U /*!< @brief Tag of the descriptor carrying the M2MChannel algorithm capabilities information.*/ 991 /** @} 992 * End of NSK2HDI_M2MCHANNELGROUP_DESC group belonging 993 */ 994 995 /** 996 ** @addtogroup NSK2HDI_M2MCHANNELGROUP_CAPS M2MChannelGroup Capability Flags 997 ** @{ 998 */ 999 #define NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG 0x01U /*!< @brief Channels within the group may be used only for NSK related opeartions. */ 1000 #define NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG 0x02U /*!< @brief Channels within the group may be used only for non NSK related opeartions. */ 1001 #define NSK2HDI_M2MCHANNELGROUP_ANY_OPERATION_ALLOWED_CAPABILITY_FLAG 0x04U /*!< @brief Channels within the group may be used with NSK2HDI_M2MCHANNEL_ANY_OPERATION. */ 1002 /** @} 1003 * End of NSK2HDI_M2MCHANNELGROUP_CAPS group belonging 1004 */ 1005 1006 /** @} 1007 * End of NSK2HDI_M2MCHANNELGROUP_DEFS group belonging 1008 */ 1009 1010 /*===========================================================================*/ 1011 /** @brief Creates an instance of the M2MChannel Group device and returns its handle to the caller. 1012 1013 @param[in] M2MChannelGroup_ID - the ID of the M2MChannel Group device to open as returned by #NSK2HDI_M2MTableDevice_EnumerateChildren function. 1014 @param[out] M2MChannelGroup_handle - pointer to the device instance handle to be returned to a caller. 1015 1016 @retval #NSK2HDI_STATUS_OK if device instance is created successfully or 1017 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1018 @retval #NSK2HDI_STATUS_FAILED if request failed. 1019 */ 1020 typedef NSK2HDI_STATUS NSK2HDI_M2MChannelGroupDevice_Open ( NSK2HDI_DEVICE_ID M2MChannelGroup_ID, 1021 NSK2HDI_HANDLE *M2MChannelGroup_handle); 1022 1023 /*===========================================================================*/ 1024 /** @brief Destroys the specified instance of the M2MChannel Group device. 1025 Releases all the resources used by this device instance. 1026 1027 @param[in] M2MChannelGroup_handle - handle of the device instance to be destroyed. 1028 1029 @retval #NSK2HDI_STATUS_OK if the device instance was destroyed or 1030 @retval #NSK2HDI_STATUS_INVALID_REQUEST if an invalid device handle was passed. 1031 */ 1032 typedef NSK2HDI_STATUS NSK2HDI_M2MChannelGroupDevice_Close ( NSK2HDI_HANDLE M2MChannelGroup_handle); 1033 1034 1035 /*===========================================================================*/ 1036 /** @brief Retrieves the Properties of the M2MChannel Group device. 1037 If desc_size is zero, the function is used to retrieve the size of the buffer to be allocated for the properties, only and the desc parameter is ignored. 1038 1039 @param[in] M2MChannelGroup_handle - a handle to the opened M2MChannel Group device. 1040 @param[in] request_id - the ID of the properties retrieval request.See \ref NSK2HDI_M2MCHANNELGROUP_REQUEST_IDS for possible values. 1041 @param[in, out] desc_size - size of the buffer allocated by the caller for the device properties as an input, actual size of the device properties returned by the device as an output. 1042 @param[out] desc - pointer to the buffer receiving the device properties. 1043 1044 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1045 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1046 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1047 */ 1048 typedef NSK2HDI_STATUS NSK2HDI_M2MChannelGroupDevice_GetProperties( NSK2HDI_HANDLE M2MChannelGroup_handle, 1049 NDS_ULONG request_id, 1050 NDS_ULONG *desc_size, 1051 NDS_UBYTE *desc); 1052 1053 /** @} 1054 * End of NSK2HDI_M2MCHANNELGROUP group belonging 1055 */ 1056 1057 /** 1058 ** @addtogroup NSK2HDI_M2MCHANNEL M2MChannel Channel Device 1059 ** @{ 1060 */ 1061 /** @addtogroup NSK2HDI_M2MCHANNEL_OPERATION M2MChannel Operation 1062 ** @{ 1063 */ 1064 #define NSK2HDI_M2MCHANNEL_DECRYPT_OPERATION 0x01U /*!< @brief Data chunk descrambling operation */ 1065 #define NSK2HDI_M2MCHANNEL_ENCRYPT_OPERATION 0x02U /*!< @brief Data chunk scrambling operation */ 1066 #define NSK2HDI_M2MCHANNEL_ANY_OPERATION 0x04U /*!< @brief Data chunk any operation */ 1067 /** @} 1068 * End of NSK2HDI_M2MCHANNEL_OPERATION group belonging 1069 */ 1070 /** 1071 ** @addtogroup NSK2HDI_M2MCHANNEL_DESC_TAGS M2MChannel Descriptor Tags 1072 ** @{ 1073 */ 1074 #define NSK2HDI_M2MCHANNEL_ALGORITHM_DESC_TAG 0x01U /*!< @brief M2MChannel algrorithm descriptor */ 1075 #define NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG 0x02U /*!< @brief M2MChannel operation. See \ref NSK2HDI_M2MCHANNEL_OPERATION for possible values */ 1076 #define NSK2HDI_M2MCHANNEL_CLEAR_SWKEY_DESC_TAG 0x03U /*!< @brief M2MChannel Clear SW key. Can be set only for M2MChannels supporting non NSK mode */ 1077 /** @} 1078 * End of NSK2HDI_M2MCHANNEL_DESC_TAGS group belonging 1079 */ 1080 1081 /*===========================================================================*/ 1082 /** @brief Creates an instance of the M2MChannel device and returns its handle to the caller. 1083 1084 @param[in] M2MChannelGroup_ID - the ID of the M2MChannelGroup device where the requested channel belongs to 1085 @param[out] M2MChannel_handle - pointer to the device instance handle to be returned to a caller. 1086 1087 @retval #NSK2HDI_STATUS_OK if device instance is created successfully or 1088 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1089 @retval #NSK2HDI_STATUS_FAILED if request failed. 1090 */ 1091 typedef NSK2HDI_STATUS NSK2HDI_M2MChannelDevice_Open ( NSK2HDI_DEVICE_ID M2MChannelGroup_ID, 1092 NSK2HDI_HANDLE *M2MChannel_handle); 1093 1094 1095 /*===========================================================================*/ 1096 /** @brief Destroys the specified instance of the M2MChannel device. 1097 Releases all the resources used by this device instance. 1098 1099 @param[in] M2MChannel_handle - handle of the device instance to be destroyed. 1100 1101 @retval #NSK2HDI_STATUS_OK if the device instance was destroyed or 1102 @retval #NSK2HDI_STATUS_INVALID_REQUEST if an invalid device handle was passed. 1103 */ 1104 typedef NSK2HDI_STATUS NSK2HDI_M2MChannelDevice_Close( NSK2HDI_HANDLE M2MChannel_handle); 1105 1106 1107 /*===========================================================================*/ 1108 /** @brief Configures the M2MChannel device. 1109 1110 @param[in] M2MChannel_handle - a handle to the opened M2MChannel device. 1111 @param[in] desc_size - size of the "desc" buffer. 1112 @param[in] desc - buffer containing the descriptors configuring the local descrambler. See \ref NSK2HDI_M2MCHANNEL_DESC_TAGS for possible descriptors 1113 1114 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1115 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1116 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1117 */ 1118 typedef NSK2HDI_STATUS NSK2HDI_M2MChannelDevice_Configure(NSK2HDI_HANDLE M2MChannel_handle, 1119 NDS_ULONG desc_size, 1120 const NDS_UBYTE *desc); 1121 1122 /*===========================================================================*/ 1123 /** @brief Request the NSK device to copy the keys and the control switches from the NSK KTE to the NSK chip key table. 1124 Can be applied only to M2MChannels having the NSK capability. 1125 1126 @param[in] M2MChannel_handle - a handle to the opened M2MChannel device. 1127 @param[in] desc_size - size of the descriptors buffer. 1128 @param[in] desc - buffer containing the descriptors. See \ref NSK2HDI_M2MCHANNEL_DESC_TAGS for possible descriptors 1129 1130 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1131 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1132 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1133 */ 1134 typedef NSK2HDI_STATUS NSK2HDI_M2MChannelDevice_NSKWriteM2MKey(NSK2HDI_HANDLE M2MChannel_handle, 1135 NDS_ULONG desc_size, 1136 const NDS_UBYTE *desc); 1137 /*===========================================================================*/ 1138 /** @brief Sets the clear SW key to M2MChannel. 1139 Can be applied only to M2MChannels having the non-NSK capability 1140 1141 @param[in] M2MChannel_handle - a handle to the opened M2MChannel device. 1142 @param[in] desc_size - size of the descriptors buffer. 1143 @param[in] desc - buffer containing the descriptors. See \ref NSK2HDI_M2MCHANNEL_DESC_TAGS for possible descriptors 1144 1145 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1146 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1147 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1148 */ 1149 typedef NSK2HDI_STATUS NSK2HDI_M2MChannelDevice_WriteM2MKey(NSK2HDI_HANDLE M2MChannel_handle, 1150 NDS_ULONG desc_size, 1151 const NDS_UBYTE *desc); 1152 /*===========================================================================*/ 1153 /** @brief Retrieves the cookie associated with M2MChannel device. 1154 1155 @param[in] M2MChannel_handle - a handle to the opened M2MChannel device. 1156 @param[out] cookie - pointer to the variable receiving the device cookie. 1157 1158 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1159 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1160 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1161 */ 1162 typedef NSK2HDI_STATUS NSK2HDI_M2MChannelDevice_GetCookie(NSK2HDI_HANDLE M2MChannel_handle, 1163 void **cookie); 1164 /** @} 1165 * End of NSK2HDI_M2MCHANNEL group belonging 1166 */ 1167 1168 /** 1169 ** @addtogroup NSK2HDI_DMA DMA Device 1170 ** @{ 1171 */ 1172 /** @addtogroup NSK2HDI_DMA_DEF DMA Definitions 1173 ** @{ 1174 */ 1175 #define NSK2HDI_DMA_UNLIMITED_DATA_SIZE 0xFFFFFFFFU /*!< @brief Data chunk size is unlimited */ 1176 /** @} 1177 * End of NSK2HDI_DMA_DEF group belonging 1178 */ 1179 /** 1180 ** @addtogroup NSK2HDI_DMA_GET_PROPERTIES_REQUEST DMA Request IDs 1181 ** @{ 1182 */ 1183 #define NSK2HDI_DMA_READ_ALL_DESCRIPTORS_REQUEST 0x00U /*!< @brief request for reading all DMA descriptors*/ 1184 /** @} 1185 * End of NSK2HDI_DMA_GET_PROPERTIES_REQUEST group belonging 1186 */ 1187 /** @addtogroup NSK2HDI_DMA_OPERATION DMA Operation 1188 ** @{ 1189 */ 1190 #define NSK2HDI_DMA_ENCRYPT_OPERATION 0x01U /*!< @brief Data chunk decrypt request */ 1191 #define NSK2HDI_DMA_DECRYPT_OPERATION 0x02U /*!< @brief Data chunk encrypt request */ 1192 /** @} 1193 * End of NSK2HDI_DMA_OPERATION group belonging 1194 */ 1195 1196 /** @addtogroup NSK2HDI_DMA_MEMORY_TYPE Data Chunk Memory Type 1197 ** @{ 1198 */ 1199 #define NSK2HDI_DMA_CONTIGUOUS_MEMORY_TYPE 0x01U /*!< @brief Data chunk memory type is contiguous */ 1200 #define NSK2HDI_DMA_NONCONTIGUOUS_MEMORY_TYPE 0x02U /*!< @brief Data chunk memory type is non-contiguous */ 1201 /** @} 1202 * End of NSK2HDI_DMA_MEMORY_TYPE group belonging 1203 */ 1204 1205 /** @addtogroup NSK2HDI_DMA_CAPABILITIES Device Capabilities 1206 ** @{ 1207 */ 1208 #define NSK2HDI_DMA_NON_CONTIGUOUS_MEMORY_ALLOWED_FLAG 0x01U /*!< @brief DMA device supports non-contiguous memory*/ 1209 /** @} 1210 * End of NSK2HDI_DMA_CAPABILITIES group belonging 1211 */ 1212 1213 /** 1214 ** @addtogroup NSK2HDI_DMA_DESCRIPTOR_TAGS DMA Descriptor Tags 1215 ** @{ 1216 */ 1217 #define NSK2HDI_DMA_IV1_DESC_TAG 0x01U /*!< @brief Descriptor carrying IV1 */ 1218 #define NSK2HDI_DMA_IV2_DESC_TAG 0x02U /*!< @brief Descriptor carrying IV2 */ 1219 #define NSK2HDI_DMA_OPERATION_DESC_TAG 0x03U /*!< @brief DMA operation. See \ref NSK2HDI_DMA_OPERATION for possible values */ 1220 #define NSK2HDI_DMA_SRC_MEMORY_TYPE_DESC_TAG 0x04U /*!< @brief Data chunk memory type. See \ref NSK2HDI_DMA_MEMORY_TYPE for possible values */ 1221 #define NSK2HDI_DMA_DST_MEMORY_TYPE_DESC_TAG 0x05U /*!< @brief Data chunk memory type. See \ref NSK2HDI_DMA_MEMORY_TYPE for possible values */ 1222 #define NSK2HDI_DMA_CAPABILITY_DESC_TAG 0x06U /*!< @brief DMA device capability descriptor. See \ref NSK2HDI_DMA_CAPABILITIES for possible values */ 1223 /** @} 1224 * End of NSK2HDI_DMA_DESCRIPTOR_TAGS group belonging 1225 */ 1226 1227 1228 1229 /*===========================================================================*/ 1230 /** @brief Creates an instance of the DMA device and returns its handle to the caller. 1231 1232 @param[in] DMA_ID - the ID of the DMA device as returned by #NSK2HDI_M2MTableDevice_EnumerateChildren. 1233 @param[out] DMA_handle - pointer to the device instance handle to be returned to a caller. 1234 1235 @retval #NSK2HDI_STATUS_OK if device instance is created successfully or 1236 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1237 @retval #NSK2HDI_STATUS_FAILED if request failed. 1238 */ 1239 typedef NSK2HDI_STATUS NSK2HDI_DMADevice_Open ( NSK2HDI_DEVICE_ID DMA_ID, 1240 NSK2HDI_HANDLE *DMA_handle); 1241 1242 1243 /*===========================================================================*/ 1244 /** @brief Destroys the specified instance of the M2MChannel device. 1245 Releases all the resources used by this device instance. 1246 1247 @param[in] DMA_handle - handle of the device instance to be destroyed. 1248 1249 @retval #NSK2HDI_STATUS_OK if the device instance was destroyed or 1250 @retval #NSK2HDI_STATUS_INVALID_REQUEST if an invalid device handle was passed. 1251 */ 1252 typedef NSK2HDI_STATUS NSK2HDI_DMADevice_Close( NSK2HDI_HANDLE DMA_handle); 1253 1254 1255 /*===========================================================================*/ 1256 /** @brief Retrieves the Properties of the DMA device. 1257 If desc_size is zero, the function is used to retrieve the size of the buffer to be allocated for the properties, only and the desc parameter is ignored. 1258 1259 @param[in] DMA_handle - a handle to the opened DMA device. 1260 @param[in] request_id - the ID of the properties retrieval request.See \ref NSK2HDI_DMA_GET_PROPERTIES_REQUEST for possible values. 1261 @param[in, out] desc_size - size of the buffer allocated by the caller for the device properties. 1262 @param[out] desc - pointer to the buffer receiving the descriptors with device properties. See \ref NSK2HDI_DMA_DESCRIPTOR_TAGS 1263 1264 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1265 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1266 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1267 */ 1268 typedef NSK2HDI_STATUS NSK2HDI_DMADevice_GetProperties( NSK2HDI_HANDLE DMA_handle, 1269 NDS_ULONG request_id, 1270 NDS_ULONG *desc_size, 1271 NDS_UBYTE *desc); 1272 1273 /*===========================================================================*/ 1274 /** @brief Writes the data to the DMA device. 1275 1276 @param[in] DMA_handle - a handle to the opened M2MChannel device. 1277 @param[in] M2MChannel_cookie - a pointer that is associated with M2M channel used for this DMA operation. See \ref NSK2HDI_M2MChannelDevice_GetCookie 1278 @param[in] desc_size - size of the "desc" buffer. 1279 @param[in] desc - buffer containing the descriptors configuring the local descrambler. See \ref NSK2HDI_M2MCHANNEL_DESC_TAGS for possible descriptors 1280 @param[in] data_size - size of the written data. 1281 @param[in] in_data_buffer - buffer containing the data to be processed 1282 @param[in] out_data_buffer - buffer intended for processed data 1283 1284 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1285 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1286 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1287 */ 1288 typedef NSK2HDI_STATUS NSK2HDI_DMADevice_WriteData( 1289 NSK2HDI_HANDLE DMA_handle, 1290 void *M2MChannel_cookie, 1291 NDS_ULONG desc_size, 1292 const NDS_UBYTE *desc, 1293 NDS_ULONG data_size, 1294 NDS_UBYTE *in_data, 1295 NDS_UBYTE *out_data); 1296 1297 1298 1299 /** @} 1300 * End of NSK2HDI_DMA group belonging 1301 */ 1302 1303 /** @} 1304 * End of NSK2HDI_M2M group belonging 1305 */ 1306 1307 /** 1308 ** @addtogroup NSK2HDI_CA_MASTER CA Master Device 1309 ** @{ 1310 */ 1311 /** 1312 ** @addtogroup NSK2HDI_CA_MASTER_DEFINITIONS CA Master Device Definitions 1313 ** @{ 1314 */ 1315 1316 /** 1317 ** @addtogroup NSK2HDI_CA_MASTER_FUNCTIONS_ID Virtual Function IDs 1318 ** @{ 1319 */ 1320 #define NSK2HDI_CASOCGROUPDEVICE_OPEN_FUNC_ID 0x00000011U /*!< @brief ID of the registered function of the #NSK2HDI_CaSoCGroupDevice_Open type */ 1321 #define NSK2HDI_CASOCGROUPDEVICE_CLOSE_FUNC_ID 0x00000012U /*!< @brief ID of the registered function of the #NSK2HDI_CaSoCGroupDevice_Close type */ 1322 #define NSK2HDI_CASOCGROUPDEVICE_ENUMERATECHILDREN_FUNC_ID 0x00000014U /*!< @brief ID of the registered function of the #NSK2HDI_CaSoCGroupDevice_EnumerateChildren type */ 1323 #define NSK2HDI_CASOCGROUPDEVICE_REGISTERENUMERATIONCHANGECB_FUNC_ID 0x00000015U /*!< @brief ID of the registered function of the #NSK2HDI_CaSoCGroupDevice_RegisterEnumerationChangeCB type */ 1324 #define NSK2HDI_OTPDEVICE_OPEN_FUNC_ID 0x00000020U /*!< @brief ID of the registered function of the #NSK2HDI_OtpDevice_Open type */ 1325 #define NSK2HDI_OTPDEVICE_CLOSE_FUNC_ID 0x00000021U /*!< @brief ID of the registered function of the #NSK2HDI_OtpDevice_Close type */ 1326 #define NSK2HDI_OTPDEVICE_GETPROPERTIES_FUNC_ID 0x00000022U /*!< @brief ID of the registered function of the #NSK2HDI_OtpDevice_GetProperties type */ 1327 #define NSK2HDI_NSKDEVICE_OPEN_FUNC_ID 0x00000030U /*!< @brief ID of the registered function of the #NSK2HDI_NskDevice_Open type */ 1328 #define NSK2HDI_NSKDEVICE_CLOSE_FUNC_ID 0x00000031U /*!< @brief ID of the registered function of the #NSK2HDI_NskDevice_Close type */ 1329 #define NSK2HDI_NSKDEVICE_READ8_FUNC_ID 0x00000032U /*!< @brief ID of the registered function of the #NSK2HDI_NskDevice_Read8 type */ 1330 #define NSK2HDI_NSKDEVICE_WRITE8_FUNC_ID 0x00000033U /*!< @brief ID of the registered function of the #NSK2HDI_NskDevice_Write8 type */ 1331 #define NSK2HDI_NSKDEVICE_READ32_FUNC_ID 0x00000034U /*!< @brief ID of the registered function of the #NSK2HDI_NskDevice_Read32 type */ 1332 #define NSK2HDI_NSKDEVICE_WRITE32_FUNC_ID 0x00000035U /*!< @brief ID of the registered function of the #NSK2HDI_NskDevice_Write32 type */ 1333 #define NSK2HDI_NSKDEVICE_EXECUTECMD_FUNC_ID 0x00000036U /*!< @brief ID of the registered function of the #NSK2HDI_NskDevice_ExecuteCmd type */ 1334 #define NSK2HDI_NSKDEVICE_REGISTEREVENTCB_FUNC_ID 0x00000037U /*!< @brief ID of the registered function of the #NSK2HDI_NskDevice_RegisterEventCB type */ 1335 #define NSK2HDI_NSKDEVICE_ACKNOWLEDGEKTE_FUNC_ID 0x00000038U /*!< @brief ID of the registered function of the #NSK2HDI_NskDevice_AcknowledgeKte type */ 1336 #define NSK2HDI_NSKDEVICE_BASICINITIALIZATIONCOMPLETE_FUNC_ID 0x00000039U /*!< @brief ID of the registered function of the #NSK2HDI_NskDevice_BasicInitializationComplete type */ 1337 #define NSK2HDI_CMCHANNELTABLEDEVICE_OPEN_FUNC_ID 0x00000040U /*!< @brief ID of the registered function of the #NSK2HDI_CmChannelTableDevice_Open type */ 1338 #define NSK2HDI_CMCHANNELTABLEDEVICE_CLOSE_FUNC_ID 0x00000041U /*!< @brief ID of the registered function of the #NSK2HDI_CmChannelTableDevice_Close type */ 1339 #define NSK2HDI_CMCHANNELTABLEDEVICE_ENUMERATECHILDREN_FUNC_ID 0x00000042U /*!< @brief ID of the registered function of the #NSK2HDI_CmChannelTableDevice_EnumerateChildren type */ 1340 #define NSK2HDI_CMCHANNELGROUPDEVICE_OPEN_FUNC_ID 0x00000050U /*!< @brief ID of the registered function of the #NSK2HDI_CmChannelGroupDevice_Open type */ 1341 #define NSK2HDI_CMCHANNELGROUPDEVICE_CLOSE_FUNC_ID 0x00000051U /*!< @brief ID of the registered function of the #NSK2HDI_CmChannelGroupDevice_Close type */ 1342 #define NSK2HDI_CMCHANNELGROUPDEVICE_GETPROPERTIES_FUNC_ID 0x00000052U /*!< @brief ID of the registered function of the #NSK2HDI_CmChannelGroupDevice_GetProperties type */ 1343 #define NSK2HDI_CMCHANNELDEVICE_OPEN_FUNC_ID 0x00000060U /*!< @brief ID of the registered function of the #NSK2HDI_CmChannelDevice_Open type */ 1344 #define NSK2HDI_CMCHANNELDEVICE_CLOSE_FUNC_ID 0x00000061U /*!< @brief ID of the registered function of the #NSK2HDI_CmChannelDevice_Close type */ 1345 #define NSK2HDI_CMCHANNELDEVICE_CONFIGURE_FUNC_ID 0x00000062U /*!< @brief ID of the registered function of the #NSK2HDI_CmChannelDevice_Configure type */ 1346 #define NSK2HDI_CMCHANNELDEVICE_WRITETRANSPORTKEY_FUNC_ID 0x00000063U /*!< @brief ID of the registered function of the #NSK2HDI_CmChannelDevice_WriteTransportKey type */ 1347 #define NSK2HDI_CMCHANNELDEVICE_INVALIDATEKEYS_FUNC_ID 0x00000064U /*!< @brief ID of the registered function of the #NSK2HDI_CmChannelDevice_InvalidateKeys type */ 1348 #define NSK2HDI_CMCHANNELDEVICE_GETCOOKIE_FUNC_ID 0x00000065U /*!< @brief ID of the registered function of the #NSK2HDI_CmChannelDevice_GetCookie type */ 1349 #define NSK2HDI_CAPIDPROXY_OPEN_FUNC_ID 0x00000070U /*!< @brief ID of the registered function of the #NSK2HDI_CaPIDProxy_Open type */ 1350 #define NSK2HDI_CAPIDPROXY_CLOSE_FUNC_ID 0x00000071U /*!< @brief ID of the registered function of the #NSK2HDI_CaPIDProxy_Close type */ 1351 #define NSK2HDI_CAPIDPROXY_SETPRIMARYSTREAMPID_FUNC_ID 0x00000072U /*!< @brief ID of the registered function of the #NSK2HDI_CaPIDProxy_SetPrimaryStreamPID type */ 1352 #define NSK2HDI_CAPIDPROXY_SETPRIMARYSTREAMCMCHANNEL_FUNC_ID 0x00000073U /*!< @brief ID of the registered function of the #NSK2HDI_CaPIDProxy_SetPrimaryStreamCmChannel type */ 1353 #define NSK2HDI_CAPIDPROXY_REMOVEPRIMARYSTREAMCMCHANNEL_FUNC_ID 0x00000074U /*!< @brief ID of the registered function of the #NSK2HDI_CaPIDProxy_RemovePrimaryStreamCmChannel type */ 1354 #define NSK2HDI_CAPIDPROXY_SETSECONDARYSTREAM_FUNC_ID 0x00000075U /*!< @brief ID of the registered function of the #NSK2HDI_CaPIDProxy_SetSecondaryStream type */ 1355 #define NSK2HDI_CAPIDPROXY_REMOVESECONDARYSTREAM_FUNC_ID 0x00000076U /*!< @brief ID of the registered function of the #NSK2HDI_CaPIDProxy_RemoveSecondaryStream type */ 1356 #define NSK2HDI_M2MTABLEDEVICE_OPEN_FUNC_ID 0x00000080U /*!< @brief ID of the registered function of the #NSK2HDI_M2MTableDevice_Open type */ 1357 #define NSK2HDI_M2MTABLEDEVICE_CLOSE_FUNC_ID 0x00000081U /*!< @brief ID of the registered function of the #NSK2HDI_M2MTableDevice_Close type */ 1358 #define NSK2HDI_M2MTABLEDEVICE_ENUMERATECHILDREN_FUNC_ID 0x00000082U /*!< @brief ID of the registered function of the #NSK2HDI_M2MTableDevice_EnumerateChildren type */ 1359 #define NSK2HDI_M2MCHANNELGROUPDEVICE_OPEN_FUNC_ID 0x00000090U /*!< @brief ID of the registered function of the #NSK2HDI_M2MChannelGroupDevice_Open type */ 1360 #define NSK2HDI_M2MCHANNELGROUPDEVICE_CLOSE_FUNC_ID 0x00000091U /*!< @brief ID of the registered function of the #NSK2HDI_M2MChannelGroupDevice_Close type */ 1361 #define NSK2HDI_M2MCHANNELGROUPDEVICE_GETPROPERTIES_FUNC_ID 0x00000092U /*!< @brief ID of the registered function of the #NSK2HDI_M2MChannelGroupDevice_GetProperties type */ 1362 #define NSK2HDI_M2MCHANNELDEVICE_OPEN_FUNC_ID 0x000000A0U /*!< @brief ID of the registered function of the #NSK2HDI_M2MChannelDevice_Open type */ 1363 #define NSK2HDI_M2MCHANNELDEVICE_CLOSE_FUNC_ID 0x000000A1U /*!< @brief ID of the registered function of the #NSK2HDI_M2MChannelDevice_Close type */ 1364 #define NSK2HDI_M2MCHANNELDEVICE_CONFIGURE_FUNC_ID 0x000000A2U /*!< @brief ID of the registered function of the #NSK2HDI_M2MChannelDevice_Configure type */ 1365 #define NSK2HDI_M2MCHANNELDEVICE_WRITETM2MKEY_FUNC_ID 0x000000A3U /*!< @brief ID of the registered function of the #NSK2HDI_M2MChannelDevice_WriteM2MKey type */ 1366 #define NSK2HDI_M2MCHANNELDEVICE_NSKWRITETM2MKEY_FUNC_ID 0x000000A4U /*!< @brief ID of the registered function of the #NSK2HDI_M2MChannelDevice_NSKWriteM2MKey type */ 1367 #define NSK2HDI_M2MCHANNELDEVICE_GETCOOKIE_FUNC_ID 0x000000A5U /*!< @brief ID of the registered function of the #NSK2HDI_M2MChannelDevice_GetCookie type */ 1368 #define NSK2HDI_DMADEVICE_OPEN_FUNC_ID 0x000000B0U /*!< @brief ID of the registered function of the #NSK2HDI_DMADevice_Open type */ 1369 #define NSK2HDI_DMADEVICE_CLOSE_FUNC_ID 0x000000B1U /*!< @brief ID of the registered function of the #NSK2HDI_DMADevice_Close type */ 1370 #define NSK2HDI_DMADEVICE_GETPROPERTIES_FUNC_ID 0x000000B2U /*!< @brief ID of the registered function of the #NSK2HDI_DMADevice_GetProperties type */ 1371 #define NSK2HDI_DMADEVICE_WRITEDATA_FUNC_ID 0x000000B3U /*!< @brief ID of the registered function of the #NSK2HDI_DMADevice_WriteData type */ 1372 /** @} 1373 * End of NSK2HDI_CA_MASTER_FUNCTIONS_ID group belonging 1374 */ 1375 1376 /** 1377 ** @addtogroup NSK2HDI_CA_MASTER_VFUNCTION Virtual Function 1378 ** @{ 1379 */ 1380 /** @brief The virtual function typedef */ 1381 typedef NSK2HDI_STATUS NSK2HDI_VFUNCTION(void); 1382 1383 /** @brief The NSK2HDI_VFUNCTION_ITEM structure used for defining the specific virtual function 1384 exposed by registered device or one of its sub-devices and the associated ID 1385 */ 1386 typedef struct _NSK2HDI_VFUNCTION 1387 { 1388 NDS_ULONG id; /*!< @brief ID of the registered function. See \ref NSK2HDI_CA_MASTER_FUNCTIONS_ID for possible values */ 1389 NSK2HDI_VFUNCTION *func; /*!< @brief pointer to registered function.*/ 1390 }NSK2HDI_VFUNCTION_ITEM; 1391 /** @} 1392 * End of NSK2HDI_CA_MASTER_VFUNCTION group belonging 1393 */ 1394 1395 /** 1396 ** @addtogroup NSK2HDI_CA_MASTER_VTABLE Virtual Function Table 1397 ** @{ 1398 */ 1399 /** @brief The NSK2HDI_VTABLE structure used for setting the virtual table 1400 with the functions exposed by registered device and its sub-devices 1401 */ 1402 typedef struct _NSK2HDI_VTABLE 1403 { 1404 NDS_ULONG version; /*!< @brief version of the structure. Must be set to zero.*/ 1405 NDS_ULONG num_vfunctions; /*!< @brief number of the exposed functions*/ 1406 NSK2HDI_VFUNCTION_ITEM *vfunction; /*!< @brief pointer to the list of the exposed function items*/ 1407 }NSK2HDI_VTABLE; 1408 1409 /** @} 1410 * End of NSK2HDI_CA_MASTER_VTABLE group belonging 1411 */ 1412 /** @} 1413 * End of NSK2HDI_CA_MASTER_DEFINITIONS group belonging 1414 */ 1415 1416 1417 /*===========================================================================*/ 1418 /** @brief DRIVER calls Verifier in order to register a new root device. 1419 The root device mast be already initialized before this call. 1420 1421 @param[in] device_type - the type of the registering device 1422 @param[in] vtable - virtual table with the functions exposed by the child device 1423 @param[out] root_device_id - the id assigned to the registered root device. 1424 @param[out] registration_handle - register device instance handle allocated by the drivers 1425 1426 The root_device_ID allocated by the Verifier for the SoC device should be used as a base 1427 for all device IDs returned by the drivers during via the enumeration functions from the provided vtable. 1428 The IDs assigned by the drivers should meet the following criteria: 1429 root_device_id & NSK2HDI_CHILD_DEVICE_ID_MASK = child_device_id & NSK2HDI_CHILD_DEVICE_ID_MASK 1430 where the value of root_device_id meets the following criteria: 1431 root_device_id & NSK2HDI_CHILD_DEVICE_ID_MASK = root_device_id 1432 1433 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1434 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1435 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1436 */ 1437 NSK2HDI_STATUS NSK2HDI_CaMasterDevice_RegisterRootDevice (NDS_ULONG device_type, 1438 NSK2HDI_VTABLE *vtable, 1439 NSK2HDI_DEVICE_ID *root_device_id, 1440 NSK2HDI_HANDLE *registration_handle); 1441 1442 /*===========================================================================*/ 1443 /** @brief Unregisters the registered child device. 1444 1445 @param[in] registration_handle - the handle of the previously registered child device. 1446 1447 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1448 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1449 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1450 */ 1451 NSK2HDI_STATUS NSK2HDI_CaMasterDevice_UnregisterRootDevice (NSK2HDI_HANDLE registration_handle); 1452 1453 1454 /** @} 1455 * End of NSK2HDI_CA_MASTER group belonging 1456 */ 1457 1458 /***********************************************************************************************************/ 1459 /***********************************************************************************************************/ 1460 /******************************** HAL ***********************************************/ 1461 /***********************************************************************************************************/ 1462 /***********************************************************************************************************/ 1463 /** 1464 ** @addtogroup NSK2HDI_NSK_HAL NSK HAL API 1465 ** @{ 1466 */ 1467 1468 /** 1469 * @addtogroup NSK2HDI_HAL_COMMON Definitions 1470 * @{ 1471 */ 1472 /** @brief NSK2 HAL drivers event callback function 1473 */ 1474 typedef void HALNSK2_NSKEVENT_CB_FN (NSK2HDI_HANDLE Nsk_handle, 1475 void *cookie); 1476 1477 /** @} 1478 * End of NSK2HDI_HAL_COMMON group belonging 1479 */ 1480 1481 /*===========================================================================*/ 1482 /** @brief Creates an instance of the HAL NSK device and returns its handle to the caller. 1483 1484 @param[in] Nsk_ID - HAL device instance identifier of the NSK device to be opened . 1485 @param[out] Nsk_handle - pointer to the device instance handle to be returned to a caller. 1486 1487 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1488 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1489 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1490 */ 1491 NSK2HDI_STATUS NSK2HAL_NskDevice_Open (NSK2HDI_DEVICE_ID Nsk_ID, 1492 NSK2HDI_HANDLE *Nsk_handle); 1493 1494 1495 /*===========================================================================*/ 1496 /** @brief Destroys the specified instance of the NSK device. 1497 Releases all the resources used by this device instance. 1498 1499 @param[in] Nsk_handle - handle of the device instance to be destroyed. 1500 1501 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1502 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1503 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1504 */ 1505 NSK2HDI_STATUS NSK2HAL_NskDevice_Close (NSK2HDI_HANDLE Nsk_handle); 1506 1507 1508 /*===========================================================================*/ 1509 /** @brief Reads data from registers 1510 1511 @param[in] Nsk_handle - a handle to the opened NSK device. 1512 @param[in] register_offset - the offset within the device memory map at which to start the read. 1513 @param[in] data_size - number of bytes to read, must be a positive multiple of 4. 1514 @param[out] data - pointer to the buffer receiving the read data. 1515 1516 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1517 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1518 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1519 */ 1520 NSK2HDI_STATUS NSK2HAL_NskDevice_Read8 (NSK2HDI_HANDLE Nsk_handle, 1521 NDS_ULONG register_offset, 1522 NDS_ULONG data_size, 1523 NDS_UBYTE *data); 1524 1525 1526 /*===========================================================================*/ 1527 /** @brief Writes data to the registers 1528 1529 @param[in] Nsk_handle - a handle to the opened NSK device. 1530 @param[in] register_offset - the offset within the device memory map at which to start the read. 1531 @param[in] data_size - number of bytes to write, must be a positive multiple of 4. 1532 @param[out] data - pointer to the buffer containing the data to be written. 1533 1534 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1535 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1536 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1537 */ 1538 1539 NSK2HDI_STATUS NSK2HAL_NskDevice_Write8 (NSK2HDI_HANDLE Nsk_handle, 1540 NDS_ULONG register_offset, 1541 NDS_ULONG data_size, 1542 const NDS_UBYTE *data); 1543 1544 1545 /*===========================================================================*/ 1546 /** @brief Reads data from registers 1547 1548 @param[in] Nsk_handle - a handle to the opened NSK device. 1549 @param[in] register_offset - the offset within the device memory map at which to start the read, must be a multiple of 4. 1550 @param[in] data_size - number of 32-bits words to read. 1551 @param[out] data - pointer to the buffer receiving the read data. 1552 1553 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1554 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1555 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1556 */ 1557 NSK2HDI_STATUS NSK2HAL_NskDevice_Read32 (NSK2HDI_HANDLE Nsk_handle, 1558 NDS_ULONG register_offset, 1559 NDS_ULONG data_size, 1560 NDS_ULONG *data); 1561 1562 /*===========================================================================*/ 1563 /** @brief Writes data to the registers 1564 1565 @param[in] Nsk_handle - a handle to the opened NSK device. 1566 @param[in] register_offset - the offset within the device memory map at which to start writing,must be a multiple of 4. 1567 @param[in] data_size - number of bytes to write. 1568 @param[out] data - pointer to the buffer containing the data to be written. 1569 1570 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1571 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1572 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1573 */ 1574 NSK2HDI_STATUS NSK2HAL_NskDevice_Write32 (NSK2HDI_HANDLE Nsk_handle, 1575 NDS_ULONG register_offset, 1576 NDS_ULONG data_size, 1577 const NDS_ULONG *data); 1578 1579 1580 1581 /*===========================================================================*/ 1582 /** @brief Registers the callback function for NSK events. 1583 This method can be called once during the device instance life cycle. 1584 1585 @param[in] Nsk_handle - a handle to the opened NSK device. 1586 @param[in] cb_routine - pointer to the #HALNSK2_NSKEVENT_CB_FN function. 1587 @param[in] cookie - a pointer that will be returned to the caller when the cb_routine is called. 1588 1589 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1590 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1591 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1592 */ 1593 NSK2HDI_STATUS NSK2HAL_NskDevice_RegisterEventCB (NSK2HDI_HANDLE Nsk_handle, 1594 HALNSK2_NSKEVENT_CB_FN *cb_routine, 1595 void *cookie); 1596 1597 1598 /*===========================================================================*/ 1599 /** @brief Sends an acknowledgment signal to the NSK that the NSK chip has finished using the KTE contents. 1600 1601 @param[in] Nsk_handle - a handle to the opened NSK device. 1602 1603 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1604 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1605 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1606 */ 1607 NSK2HDI_STATUS NSK2HAL_NskDevice_AcknowledgeKte(NSK2HDI_HANDLE Nsk_handle); 1608 1609 /*===========================================================================*/ 1610 /** @brief Called to indicate that NSK basic initialization is complete. 1611 1612 @param[in] Nsk_handle - a handle to the opened NSK device. 1613 1614 @retval #NSK2HDI_STATUS_OK if the operation completed successfully or 1615 @retval #NSK2HDI_STATUS_INVALID_REQUEST if one or more parameters are invalid or 1616 @retval #NSK2HDI_STATUS_FAILED if the operation failed. 1617 */ 1618 NSK2HDI_STATUS NSK2HAL_NskDevice_BasicInitializationComplete(NSK2HDI_HANDLE Nsk_handle, NDS_ULONG stage); 1619 1620 1621 /** @} 1622 * End of NSK2HDI_NSK_HAL group belonging 1623 */ 1624 1625 /** @} 1626 * End of NSK2HDI_CA_DEVICES group belonging 1627 */ 1628 1629 1630 #endif /*H_NSK_282*/ 1631