libcdio  0.90
mmc_ll_cmds.h
Go to the documentation of this file.
00001 /*
00002     Copyright (C) 2010, 2012 Rocky Bernstein <rocky@gnu.org>
00003 
00004     This program is free software: you can redistribute it and/or modify
00005     it under the terms of the GNU General Public License as published by
00006     the Free Software Foundation, either version 3 of the License, or
00007     (at your option) any later version.
00008 
00009     This program is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012     GNU General Public License for more details.
00013 
00014     You should have received a copy of the GNU General Public License
00015     along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016 */
00017 
00035 #ifndef CDIO_MMC_LL_CMDS_H_
00036 #define CDIO_MMC_LL_CMDS_H_
00037 
00038 #include <cdio/mmc.h>
00039 
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif /* __cplusplus */
00043 
00067     driver_return_code_t 
00068     mmc_get_configuration(const CdIo_t *p_cdio, void *p_buf, 
00069                           unsigned int i_size, 
00070                           unsigned int i_return_type, 
00071                           unsigned int i_starting_feature_number,
00072                           unsigned int i_timeout_ms);
00073 
00084   driver_return_code_t mmc_get_event_status(const CdIo_t *p_cdio, 
00085                                             uint8_t out_buf[2]);
00086 
00087 
00106   driver_return_code_t mmc_mode_select_10(CdIo_t *p_cdio, /*out*/ void *p_buf,
00107                                           unsigned int i_size, int page, 
00108                                           unsigned int i_timeout_ms);
00122   driver_return_code_t mmc_mode_sense_10( CdIo_t *p_cdio, /*out*/ void *p_buf,
00123                                           unsigned int i_size, 
00124                                           unsigned int i_page_code);
00125   
00135   driver_return_code_t  mmc_mode_sense_6( CdIo_t *p_cdio, /*out*/ void *p_buf, 
00136                                           unsigned int i_size, int page);
00137   
00153     driver_return_code_t 
00154     mmc_prevent_allow_medium_removal(const CdIo_t *p_cdio, 
00155                                      bool b_persistent, bool b_prevent,
00156                                      unsigned int i_timeout_ms);
00157     
00261   driver_return_code_t
00262   mmc_read_cd(const CdIo_t *p_cdio, void *p_buf, lsn_t i_lsn, 
00263               int expected_sector_type, bool b_digital_audio_play,
00264               bool b_sync, uint8_t header_codes, bool b_user_data, 
00265               bool b_edc_ecc, uint8_t c2_error_information, 
00266               uint8_t subchannel_selection, uint16_t i_blocksize, 
00267               uint32_t i_blocks);
00268   
00287  driver_return_code_t 
00288  mmc_read_disc_information(const CdIo_t *p_cdio, /*out*/ void *p_buf,
00289                            unsigned int i_size, 
00290                            cdio_mmc_read_disc_info_datatype_t data_type,
00291                            unsigned int i_timeout_ms);
00292     
00319   driver_return_code_t mmc_set_speed( const CdIo_t *p_cdio, 
00320                                       int i_Kbs_speed,
00321                                       unsigned int i_timeout_ms);
00322   
00343   driver_return_code_t mmc_start_stop_unit(const CdIo_t *p_cdio, bool b_eject, 
00344                                            bool b_immediate, 
00345                                            uint8_t power_condition,
00346                                            unsigned int i_timeout_ms);
00347 
00359   driver_return_code_t mmc_test_unit_ready(const CdIo_t *p_cdio,
00360                                            unsigned int i_timeout_ms);
00361 
00362 
00363 #ifndef DO_NOT_WANT_OLD_MMC_COMPATIBILITY
00364 #define mmc_start_stop_media(c, e, i, p, t) \
00365     mmc_start_stop_unit(c, e, i, p, t, 0)
00366 #endif /*DO_NOT_WANT_PARANOIA_COMPATIBILITY*/
00367 
00368 #ifdef __cplusplus
00369 }
00370 #endif /* __cplusplus */
00371 
00372 #endif /* CDIO_MMC_HL_CMDS_H_ */
00373 
00374 /* 
00375  * Local variables:
00376  *  c-file-style: "gnu"
00377  *  tab-width: 8
00378  *  indent-tabs-mode: nil
00379  * End:
00380  */